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

Fix migration crash on client load #1509

Closed
wants to merge 1 commit into from
Closed

Fix migration crash on client load #1509

wants to merge 1 commit into from

Conversation

1hitsong
Copy link
Member

@1hitsong 1hitsong commented Nov 16, 2023

Changes

Fixes crash both Jimi and I experienced where the client would crash on load when attempting to run migrations.

12a66759-58ca-4b19-a427-8a0057a326d8

@1hitsong 1hitsong requested a review from a team as a code owner November 16, 2023 19:57
@cewert
Copy link
Member

cewert commented Nov 16, 2023

I tracked this down to a bad line of code I wrote in migrations.bs. It's trying to use m.global.session.server.id but it will always be invalid at this point in the app when the function is called. We should just remove it instead of fixing it because what it's trying to do makes no sense anyway - the active server id is staying on the global "jellyfin" block and doesn't need to be migrated anywhere.

One bad thing about brighterscript is that the lines shown on error logs are for the transpiled files and not the source files. I forgot this and couldn't figure out how line 18 in migrations (from your error tracestack) was writing to the reg but when I checked build/staging/ the line number matched the right line of code: registry_write("serverId", m.global.session.server.id, savedUserId)

@1hitsong 1hitsong closed this Nov 16, 2023
@1hitsong 1hitsong deleted the fixMigrationCrashOnLoad branch November 16, 2023 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants