Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 after upgrade from v6.1.13 to v6.1.14 or v6.1.15 #8821

Closed
4 tasks done
zynexiz opened this issue Apr 25, 2024 · 29 comments
Closed
4 tasks done

Error 500 after upgrade from v6.1.13 to v6.1.14 or v6.1.15 #8821

zynexiz opened this issue Apr 25, 2024 · 29 comments

Comments

@zynexiz
Copy link

zynexiz commented Apr 25, 2024

Support guidelines

I've found a bug and checked that ...

Description

I read the previous bug about this, when upgrading to v6.1.14 and the issue still persists for v6.1.15 (tried both). I use a upgrade script I have created that basically do a clean installation (and copies .env and storage to the new location), but both versions fail to upgrade. If I'm logged in while doing the upgrade the session works, but the login page trow error 500.

Debug information

error.log
Error log from my server

@JC5
Copy link
Member

JC5 commented Apr 25, 2024

I'm sorry, I still have no solution. Are you also running Firefly III in a subdirectory?

@zynexiz
Copy link
Author

zynexiz commented Apr 25, 2024

No, i'm running it directly thru a subdomain I configured.

@JC5
Copy link
Member

JC5 commented Apr 25, 2024

Could you share with me (over mail) your configuration and webserver configuration?

james@firefly-iii.org

@zynexiz
Copy link
Author

zynexiz commented Apr 25, 2024

Is it the .env file you thinking of for the configuration?

@BoGnY
Copy link
Contributor

BoGnY commented Apr 26, 2024

try deleting vite manifest file and rebuilt it.
manifest searchs an old path that not exists (resources/assets/v2/sass/app.scss) but the correct path is resources/assets/v2/src/sass/app.scss...

have you extracted archive as noted here?? starting from 6.1.13 git pull can't be used.. I've made a similar error because I use an upgrade script as you and I haven't updated it the first time 😞

😄

@JC5
Copy link
Member

JC5 commented Apr 26, 2024

Yes. But also whichever webserver is in front of Firefly III

@mvanrompuy
Copy link

Also willing to help with providing info. Running firefly from a subdomain served over nginx.

Same issue: 6.1.13 worked, 6.1.15 doesn't on my desktop browser, I'm referred to the login page and I get the above mentioned error.

I still have a valid session on my phone, there 6.1.15 works..

@JC5
Copy link
Member

JC5 commented Apr 27, 2024

Same question to you. I have a hard time replicating this. Could you share with me (over mail) your Firefly III configuration (docker compose file, .env file, etc) and your webserver configuration?

james@firefly-iii.org

@zynexiz
Copy link
Author

zynexiz commented Apr 27, 2024

Yes. But also whichever webserver is in front of Firefly III

Sorry for the late response, been knocked out for some days with the flue here. I'll strip some info from the .env and send it to you. I'm running Apache on Arch Linux (no docker or reverse proxy).

@zynexiz
Copy link
Author

zynexiz commented Apr 27, 2024

Btw, here's the script I created for updating the application (some paths revoked). Worked really good until now :)

#!/bin/bash

# If not user http, run it as that user
if [ $USER != "http" ]; then
  SELF_NAME=`basename $0`
  SELF_PATH=$(dirname $(readlink -f $0))
  sudo -u http "$SELF_PATH/$SELF_NAME"
  exit
fi

# Get latest version of firefly
latestversion=$(curl -s https://api.github.com/repos/firefly-iii/firefly-iii/releases/latest  | grep -oP '"tag_name": "\K(.*)(?=")')
installedversion=`cat <path to http root>/firefly-iii/version`

if [ $installedversion == $latestversion ]; then
  echo 'Already latest version ('$installedversion')'
  exit
fi

echo 'Version '$installedversion' installed, new version '$latestversion

# Download and unpack the new version and copy files from old instance
cd <path to http root>
echo -n 'Downloading and unpacking Firefly III version '$latestversion'... '
wget -q https://github.com/firefly-iii/firefly-iii/releases/download/$latestversion/FireflyIII-$latestversion.zip
unzip -q -o FireflyIII-$latestversion.zip -d ./firefly-iii-update
cp firefly-iii/.env firefly-iii-update/.env
cp -r firefly-iii/storage ./firefly-iii-update
echo "done."

# Install latest version
cd firefly-iii-update
php artisan migrate --seed
php artisan firefly-iii:decrypt-all
php artisan cache:clear
php artisan firefly-iii:upgrade-database
php artisan firefly-iii:laravel-passport-keys
php artisan cache:clear

cd ..
# Remove old version of firefly-iii
if [ -d "firefly-iii-old" ]; then
  rm -r firefly-iii-old
fi

# Serve the new version
mv firefly-iii firefly-iii-old
mv firefly-iii-update firefly-iii
rm FireflyIII-$latestversion.zip

echo $latestversion | tee /srv/http/firefly-iii/version > /dev/null

@JC5
Copy link
Member

JC5 commented Apr 27, 2024

Mmm. Thanks for your config files.

An alternative solution, clear your browser cache of browse to your-firefly-iii.com/build/manifest.json and do a hard refresh (ctrl F5 usually does it).

@zynexiz
Copy link
Author

zynexiz commented Apr 27, 2024

As I wrote in the mail, I have set Firefox (or well, LibreWolf really) to clear the browser when i close it. So I don't really think it's on the browser side in this case. Also get the same error when trying Falkon browser.
scrdump

@zynexiz
Copy link
Author

zynexiz commented Apr 27, 2024

One odd think I just noticed is this line in the logs; [2024-04-25 12:53:43] local.ERROR: Exception is: {"class":"Illuminate\\View\\ViewException","errorMessage":"Unable to locate file in Vite manifest: resources\/assets\/v2\/sass\/app.scss. (View: \/srv\/http\/firefly-iii\/resources\/views\/layout\/v2\/error.blade.php) (View: \/srv\/http\/firefly-iii\/resources\/views\/layout\/v2\/error.blade.php)","time":"Thu, 25 Apr 2024 12:53:43 +0200","file":"\/srv\/http\/firefly-iii\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Vite.php","line":781,"code":0,"version":"6.1.15","url":"https:\/\/ff.zoik.se\/login","userAgent":"Mozilla\/5.0 (Windows NT 10.0; rv:124.0) Gecko\/20100101 Firefox\/124.0","json":true,"method":"GET","post":""}

Seems to think that resources/assets/v2/sass/app.scss don't exists. But when looking it does exist in my file system, so I'm not sure why it throws this error really.

@JC5
Copy link
Member

JC5 commented Apr 27, 2024

Exactly, nor do I. But we'll get to the bottom of this!

@JC5
Copy link
Member

JC5 commented Apr 27, 2024

That error is especially weird since there is NO reference to that path in v2/error.blade.php.

Sorry, I have to ask. Are you sure you've copied over all the files correctly?

@zynexiz
Copy link
Author

zynexiz commented Apr 27, 2024

Exactly, nor do I. But we'll get to the bottom of this!

Oh, I think I might have looked for the path on the old installation. I just updated it again, and now the path don't exist at all.

Screenshot_20240427_170406

@zynexiz
Copy link
Author

zynexiz commented Apr 27, 2024

That error is especially weird since there is NO reference to that path in v2/error.blade.php.

Sorry, I have to ask. Are you sure you've copied over all the files correctly?

I actually redo the installation completely (if you look at the script). I don't reuse any old code, just download the zip-file and unpack it, copy .env and data to the new path. Might be something missing the zip-file?

[EDIT]
Looked at the new error.blade.php, and it actually points to @Vite(['src/sass/app.scss']). I tried restarting the web server completely, feels like some caching issue actually. But got the same issue, gonna look deeper into why this is the case.

@mvanrompuy
Copy link

Exactly, nor do I. But we'll get to the bottom of this!

Oh, I think I might have looked for the path on the old installation. I just updated it again, and now the path don't exist at all.

Screenshot_20240427_170406

This is indeed what I'm seeing as well. There's an intermediate 'src' folder that is different from the path in the error log.

@zynexiz
Copy link
Author

zynexiz commented Apr 27, 2024

Thats the weird part, looking in the error.blade.php, it doesn't have that path anymore so I'm not sure whats going on. I use Redis cache, so that might be a part of the issue. I'm looking into it now.

[EDIT]
Clearing Redit cache didn't fix it, must be something else.....??

@JC5
Copy link
Member

JC5 commented Apr 27, 2024

I actually redo the installation completely (if you look at the script). I don't reuse any old code, just download the zip-file and unpack it, copy .env and data to the new path. Might be something missing the zip-file?

I had to check, but in both zip files the file is there. There is a notable difference between .13 and .15, which is the manifest result path:

image

However, I'm not yet sure why these are so different, or rather: why it's a problem.

@zynexiz
Copy link
Author

zynexiz commented Apr 27, 2024

I actually redo the installation completely (if you look at the script). I don't reuse any old code, just download the zip-file and unpack it, copy .env and data to the new path. Might be something missing the zip-file?

I had to check, but in both zip files the file is there. There is a notable difference between .13 and .15, which is the manifest result path:
image

However, I'm not yet sure why these are so different.

I saw the difference to, but that shouldn't trow this error. I looked in the new file, and the new path is indeed there. But the error in the logfile points to the old path which don't make any cense at all IMO.

@JC5
Copy link
Member

JC5 commented Apr 27, 2024

Mmmm, php artisan cache:clear should catch it, but what happens when you do php artisan view:clear?

@zynexiz
Copy link
Author

zynexiz commented Apr 27, 2024

php artisan view:clear

You are kidding me! That worked 😄
Need to add that to my script! Nice catch :)

What's the difference between view:clear and cache:clear?

@JC5
Copy link
Member

JC5 commented Apr 27, 2024

I have no clue, I thought they would be the same! :D I shall update the documentation right away!

@zynexiz
Copy link
Author

zynexiz commented Apr 27, 2024

I have no clue, I thought they would be the same! :D I shall update the documentation right away!

Apparently they do something different haha.. I added that line to my script, and now the update works smooth again :)

JC5 added a commit to firefly-iii/docs that referenced this issue Apr 27, 2024
@JC5
Copy link
Member

JC5 commented Apr 27, 2024

Nice, thanks for helping me find this. The documentation is updated and a new run should put it online in a few mins.

@mvanrompuy, let me know if this works for you as well.

@mvanrompuy
Copy link

Not at home, but just tried a new session on my phone. Seems to fix it for me as well. 😄 Thanks for spending the time on figuring this out!

@zynexiz
Copy link
Author

zynexiz commented Apr 27, 2024

Nice, thanks for helping me find this. The documentation is updated and a new run should put it online in a few mins.

@mvanrompuy, let me know if this works for you as well.

NP :) Glad to help. If you want you can provide my update script to update it a bit smoother. Can make some changes to provide variables to the www root in that case.

@zynexiz zynexiz closed this as completed Apr 27, 2024
Copy link
Contributor

Hi there! This is an automatic reply. Share and enjoy

This issue is now 🔒 closed. Please be aware that closed issues are not monitored by the developer of Firefly III.

  • If the original bug is not actually fixed, please open a new issue. Refer to this issue for clarity.
  • Follow-up questions must be posted in a new discussion
  • Further replies to this issue may get no response.

If there is more to discuss, please open a new issue or discussion.

Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants