Expo app breaks
See original GitHub issueBug report
Describe the bug
Expo apps that use supabase/supabase-js
completely break after updating to SDK43.
To Reproduce
- Go to https://github.com/10000multiplier/exposupabasebug
git clone https://github.com/10000multiplier/exposupabasebug.git
npm i
expo start
Expected behavior
Supabase-js behaves flawlessly on expo apps as it did on SDK42.
More info
The fatal error that appears after running expo start
:
Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
System information
- OS: Windows
- Version of supabase-js: ^1.25.2
- Version of Node.js: 16.13.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top Results From Across the Web
expo publish creates broken build and app crash on launch
Actual Behavior. trying to publish the app using expo publish creates a broken build and when i try to access the app through...
Read more >Troubleshooting build errors and crashes - Expo Documentation
This particular error means that the app is importing ./src/Routes and it is not found. The cause could be that the filename case...
Read more >React Native Expo App breaks on "There are multiple ...
My react native expo app broke after I changed the casing of the folder, It worked locally but it broke when I connected...
Read more >5 common errors found in a React Native app (using Expo)
In this article, I will list 5 errors that we as developers faced, while creating a mobile app in React Native (using Expo)...
Read more >Expo built app crash on Testflight | Apple Developer Forums
This means that your app crashed itself by calling abort . The presence of the Last Exception Backtrace section indicates that this is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As an update, it appears that adding
detectSessionInUrl: false
into the options ofcreateClient
resolves this issue. This certainly seems to be a new change compared to last time I tried it in a native context, and I’m not sure if this affects other functionality of using Supabase in Expo.Example:
Of relevance, when running this example, this error shows up as well:
I’ve just tested in one of my in-development projects, and can confirm that the same issue exists. The error shown on screen seems to point towards the
getParameterByName
function ingotrue-js
: https://github.com/supabase/gotrue-js/blob/master/src/lib/helpers.ts#L16Edit - 04:50 UK time: Checked for issues in the main expo repo and haven’t found any reports related to href not being defined. Realistically,
window
doesn’t exist in React Native, but it doesn’t explain why this issue didn’t exist until recently. This issue doesn’t happen when running on Web, and only happens when running the native app.