YunoHost-Apps / castopod_ynh

Castopod package for YunoHost
https://podlibre.org/
GNU General Public License v3.0
23 stars 7 forks source link

Upgrade to 1.0.1~ynh1 results in Your PHP version must be 8.1 or higher to run CodeIgniter. Current version: 8.0.25 #84

Closed DDRrayray2012 closed 1 year ago

DDRrayray2012 commented 2 years ago

Describe the bug

After upgrading to 1.0.1~ynh1, the following statement comes up when navigating to castopod instance "Your PHP version must be 8.1 or higher to run CodeIgniter. Current version: 8.0.25".

Context

Expected behavior

Upgrade to the current version of ynh castopod version with normal access function.

mattbk commented 2 years ago

Allegedly closed after https://github.com/YunoHost-Apps/castopod_ynh/issues/80, but I'm hitting the same issue tonight.

Looks like there is a PR: https://github.com/YunoHost-Apps/castopod_ynh/pull/82

xplosionmind commented 2 years ago

I am having the same problem…

sekretaerbaer commented 2 years ago

same error when updating to 1.0.2~ynh1

xplosionmind commented 1 year ago

I confirm: still relevant in version 1.0.2~ynh1

rthees commented 1 year ago

Same here.

xplosionmind commented 1 year ago

Still happening in 1.0.3~ynh1. This is what I see now:

Screenshot 2022-11-19 at 11 37 23 AM

rthees commented 1 year ago

After upgrading to 1.0.3~ynh1, frontend is running fine. But when i log in the backend, i also get the "Whoops!" screen.

DDRrayray2012 commented 1 year ago

Same with mine. I tested using both username and email on version 1.0.0-99~ynh2 and both worked fine but on 1.0.3~ynh1, which requires using email to log in, i get the whoops screen noted above.

sekretaerbaer commented 1 year ago

the same after update to 1.0.4ynh1

rthees commented 1 year ago

confirmed: after updating to 1.0.4ynh1 the castopod-frontend is working. But when i log in the backend, the "Whooops"-Error appears again.

sekretaerbaer commented 1 year ago

the same after update to 1.0.5ynh1

DDRrayray2012 commented 1 year ago

I can confirm rthees comment above. I'm also getting the Whoops error after trying to login with email.

DDRrayray2012 commented 1 year ago

Same issue is still present in the 1.1.0~ynh1 update

DDRrayray2012 commented 1 year ago

looks like it's still an issue with the 1.1.2~ynh1 update.

xplosionmind commented 1 year ago

Hi @ericgaspar, is there any update or any fix planned? We would really appreciate it! ❤️

ericgaspar commented 1 year ago

Nobody as posted logs in this issue. We need logs.

xplosionmind commented 1 year ago

We need logs.

Sorry… There you go @ericgaspar: the following is the browser console log I see when visiting https://sconnesso.link, my Castopod installation. Any other logs I could give you? I do not know where to retrieve them.

15:40:14.779 GEThttps://sconnesso.link/
[HTTP/2 500 Internal Server Error 96ms]

15:40:15.085 GEThttps://sconnesso.link/ynh_portal.js
[HTTP/2 404 Not Found 44ms]

15:40:15.086 GEThttps://sconnesso.link/ynh_overlay.css
[HTTP/2 404 Not Found 44ms]

15:40:15.087 GEThttps://sconnesso.link/ynhtheme/custom_portal.js
[HTTP/2 404 Not Found 56ms]

15:40:15.089 GEThttps://sconnesso.link/ynhtheme/custom_overlay.css
[HTTP/2 404 Not Found 53ms]

15:40:15.140 The resource from “https://sconnesso.link/ynh_portal.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). sconnesso.link
15:40:15.140 The resource from “https://sconnesso.link/ynh_overlay.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). sconnesso.link
15:40:15.143 Loading failed for the <script> with source “https://sconnesso.link/ynh_portal.js”. sconnesso.link:11:1
15:40:15.170 The resource from “https://sconnesso.link/ynhtheme/custom_overlay.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). sconnesso.link
15:40:15.173 The resource from “https://sconnesso.link/ynhtheme/custom_portal.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). sconnesso.link
15:40:15.174 Loading failed for the <script> with source “https://sconnesso.link/ynhtheme/custom_portal.js”. sconnesso.link:11:1
15:40:15.176 GEThttps://sconnesso.link/ynh_overlay.css
[HTTP/2 404 Not Found 30ms]

15:40:15.231 The resource from “https://sconnesso.link/ynh_overlay.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). sconnesso.link
15:40:15.234 GEThttps://sconnesso.link/ynhtheme/custom_overlay.css
[HTTP/2 404 Not Found 30ms]

15:40:15.279 Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. node.js:396
15:40:15.293 The resource from “https://sconnesso.link/ynhtheme/custom_overlay.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). sconnesso.link
ericgaspar commented 1 year ago

can you add CI_ENVIRONMENT=development in the .env file and restart service to get the full log message?

xplosionmind commented 1 year ago

Could you please indicate me better where I could get the full log message?

In the meanwhile, I changed the .env file within the Castopod directory like this:

#--------------------------------------------------------------------
# Example Environment Configuration file
# 
# This file can be used as a starting point for
# your castopod instance settings.
#
# For manual configuration:
#   - copy this file's contents to a file named `.env`
#   - replace all the default settings with your values
#   - go to `/cp-install` to complete installation
#--------------------------------------------------------------------

#--------------------------------------------------------------------
# Instance configuration
#--------------------------------------------------------------------
app.baseURL="https://sconnesso.link/"
app.mediaBaseURL="https://sconnesso.link/"
admin.gateway="admin"
auth.gateway="auth"

#--------------------------------------------------------------------
# Database configuration
#--------------------------------------------------------------------
database.default.hostname="localhost"
database.default.database="castopod"
database.default.username="castopod"
database.default.password="wdJqAuEI6WqWbaePBlDyXdgD"
database.default.DBPrefix="cp_"

#--------------------------------------------------------------------
# Redis configuration
#--------------------------------------------------------------------
cache.handler="redis"
cache.redis.host="127.0.0.1"
cache.redis.password=null
cache.redis.port=6379
cache.redis.database=1
analytics.salt="kGX3O4!=iE>uTirqH#<{!Okasga+X&RB*dn)8D3xxXSeCIQyJNK16DCe~0;74(}W"

CI_ENVIRONMENT=development
ericgaspar commented 1 year ago

if you go to https://sconnesso.link/ your should get error messages displayed

xplosionmind commented 1 year ago

if you go to https://sconnesso.link/ your should get error messages displayed

Oh, ok! Sorry… As you can see yourself, there are several things I do not understand… The screenshots of the page are below, while the saver version on the Wayback Machine is here. For simplicity, I also saved a Markdown version, here

Screenshot 2023-01-19 at 16 55 58 Screenshot 2023-01-19 at 16 56 06 Screenshot 2023-01-19 at 16 56 17 Screenshot 2023-01-19 at 16 56 26 Screenshot 2023-01-19 at 16 56 33 Screenshot 2023-01-19 at 16 56 50 Screenshot 2023-01-19 at 16 56 56 Screenshot 2023-01-19 at 16 57 06
xplosionmind commented 1 year ago

Let me know if I can be of further assistance!

DDRrayray2012 commented 1 year ago

I stupidly posted mine in the Yunohost forum and not here (apologies for that!). Here's my info as well. After upgrading from 1.0.0-99~ynh2 to 1.1.2~ynh1, when I attempt to log in, the website immediately goes to the “Whoops we’ve hit a snag” splash page.

below are the logs from the install: https://paste.yunohost.org/raw/isayuzodam

Restoring back to 1.0.0-99~ynh2 allows logging in as expected.

If there's more info you need from me, let me know!

xplosionmind commented 1 year ago

Thanks a lot for sharing, @DDRrayray2012! I would love to learn how to roll back to a previous version… could you point me to some documentation or tell me how to do it? Thanks a lot ❤️

ericgaspar commented 1 year ago

To give some context. During the beta phase, Castopod added many additions/modifications in the database. YunoHost script did not handle database migration from beta versions to 1.0.0. Thus, some may have missing items in their database.

Now for your unknown column cp_podcasts.published_at, we can try this. (this is not tested)

in a terminal:

sudo su

then

source /usr/share/yunohost/helpers

then

ynh_mysql_execute_as_root --database=castopod --sql=<<'EOF'
SET AUTOCOMMIT = 0;
START TRANSACTION;

ALTER TABLE `cp_settings`
ADD COLUMN context VARCHAR(255) NULL AFTER `type`;

ALTER TABLE cp_podcasts ADD COLUMN published_at DATETIME DEFAULT NULL AFTER 
updated_by;
UPDATE cp_podcasts SET published_at = created_at;
EOF
DDRrayray2012 commented 1 year ago

Thanks a lot for sharing, @DDRrayray2012! I would love to learn how to roll back to a previous version… could you point me to some documentation or tell me how to do it? Thanks a lot ❤️

when you install an update yunohost does a backup of the current version. Check your backups to make sure it's there before you do anything! Once you have, you can uninstall the updated version of castopod and restore the backup in the backups section.

xplosionmind commented 1 year ago

Thanks @ericgaspar, I performed the steps you suggested. The output I get is:

+ database=castopod
+ '[' -n castopod ']'
+ database=--database=castopod
+ mysql -B --database=castopod
xplosionmind commented 1 year ago

I rebooted the server. Nothing changes, the error still appears.

xplosionmind commented 1 year ago

Hi @ericgaspar, the app is currently flagged as high quality in the catalog, but it is having these great issues… I think this needs to be fixed soon, or to change the flag in the catalog.

xplosionmind commented 1 year ago

Hello, the problem is still present in version 1.1.2~ynh2