I am trying to publish an update to my app after upgrading the SDK from 27 to 32. The app works fine when I do expo start and run it on the emulator. But, when I do expo publish the finished app can't make network calls. Then, I realized you couldn't do expo publish if you update SDK (it still push the update somehow though), so I built the APK for Android. Thing is, the APK file nor the expo publish update work. It can't make network calls to pull user info for instance, but it works just fine with expo start.
Any ideas on what this could be or how can I troubleshoot it? I went back to the commit with SDK 27, built it and still, the app can't make network calls. It is also the first time I build this app from this computer.
Did you check if you are using the __DEV__ constant somewhere?
Both the APK and the APK in the market are now on __DEV__ == false.
Are you sure that the app is not making calls?
Are you sure that they don't reach the server?
Are you sure that is not the server that is rejecting?
Did you try to make the calls outside of the app using a program like Postman?
Related
guys, I'm totally new here and I'm hoping I really get the help I need 🙏🏼
I built an apk package with eas build -p android --profile test, the build was successful. App installed successfully on mobile but it fails to open. once clicked, it just opens then immediately closes back.
I’m all new to expo and development in general.
I saw a documentation to run the app via npx expo start --no-dev --minify ; as this mimics production mode in local server. I did that and It returns a “uncaught error: java.lan.exception:failed to load all assests” I reloaded like 4 times and app opens fine after that. And does not bring the error again when I rebundle app.
However I have observed it brings the error (java.lang.exception:failed to load all assests) once everytime I stop and restart the expo server.
But app doesn't launch at all when I build to standalone.
Please help here, how do I fix this? 🙏🏼
This is the way I solved it
Follow the steps.
1.) Turn on USB Tethering & USB Debugging Mode in your mobile.
2.) Connect your mobile to your laptop through USB.
3.) Verify the connection options on your device, I just added WIFI bridge / I assume i the same as wifi debugging and then, restarted the device and run expo and it worked.
Above solution is worked for me.
I am working in an established iOS app. I have backfilled the app to use React Native, and so far that part is working fine. The problems I am running into are:
The Xcode build takes a very long time, and any JavaScript errors will cause the initial build to fail
Once the build succeeds and the app is started (on a physical device), the initial launch says it is trying to connect to Metro, but it never actually does. Instead the RN view pops into place without downloading from the server. At this point I cannot refresh the JavaScript from the Metro bundler, it states that there is no app connected. Additionally, if I shake the device and try to select "Debug in Chrome" the screen will go blank and no longer respond.
If I do not try to open the developer menu and select "Debug in Chrome", but instead just force close the app, when I re-launch the app (not rebuild from Xcode) it will connect to Metro and download the JavaScript bundle like normal. At this point I can select "Debug in Chrome" and it will connect and work just fine.
All-in-all, this isn't a huge issue as there is a workaround available to me. However, it doesn't feel right and I would like to figure out what is going on.
My theory is that during the build process, Xcode is bundling the React Native code as if it is trying to do a production build (I have verified the scheme is set to debug) in a debug executable. I have tried detecting __DEV__ and it is true, so I cannot figure out how to get the app to connect to Metro directly after the Xcode build.
Thank you all in advance for any help you can offer.
I am building an app in react native detached and I was wondering what would happen if one day Expo is no longer available or get shut down so then my app is not able to run bc it relies on expo.
Is it possible that I have my own javascript bundle locally or running on my server so I don't have to rely on expo at all. If so what changes are needed so my .apk file is not relying on expo but rather on my own bundle.js
The eject command doesn't depend on expo, so if one day expo stops working, you can detach your project from theirs and start building your own apk.
I am not sure if this is a thing, or possibly and issue. I am hoping others have experienced it. But every time I put a dev build on my iphone through xcode, the app works fine on the device while unplugged from the computer for about a week. Then the app crashes at the splash screen. Every dev build of an app I have loaded on my device has done this. Even example apps I have downloaded from the web.
Does a development build of the app expire, or maybe the certificates expire or some other issue that causes the app on the device to start crashing after its been on the device for a certain time?
Solution 1: Turn off the WiFi on your iPhone or just make sure your phone and your PC are not on the same WiFi Network.
Solution 2: Run your app on the device using a Static Js bundle. To build static bundle follow these instructions for running on device via static bundle
Reason: This happens because when your phone and PC are on the same WiFi network then the app on phone tries to connect to the app development server to load the latest Js bundle, but when it could not connect to development server or could not fetch the latest Js bundle then the app crashes. By turning off your WiFi or changing the Wifi network causes the application to load the pre-build bundle and prevents the app from crashing.
I ran into the same thing and finally figured it out. If you're using a Xcode provisioning profile instead of signing up for the Apple Developer Program and paying yearly then what you're doing is getting a temporary profile that lasts about a week. Once it expires, any device with the app installed will stop working until you rebuild it with the new profile. You can see your profile/expiration if you go to General->Signing and click the 'i' next to provisioning profile.
I hope If app is opening to splash screen then there is no wrong with application building. After Splash are you going to use any web services or related to your localhost site. If yes then definitely issue is there.
Let me know if it is helpful .
When build on your phone, you want to change your scheme to Release. Please follow this https://facebook.github.io/react-native/docs/running-on-device.html, which will show you how to change your scheme to Release.
If you did lots of upgrade when developing, you might want to delete the node_modules folder, and do a clean npm install again, prior to build on phone process.
I recently bumped on a problem regarding installing / updating app on the device before running tests.
driver.init(desired)
It seems that when you initialize a new session, if the app is not installed, it will install it. However when an older version of the app is already installed, it won't update it.
it('initialise appium session', function(){
return actionsManager.startSession(desired);
});
it('installs app', function(){
return actionsManager.installApp(context.desired.app);
});
I've tried the above code but it launches the app first, and then it doesn't seem to install the app (I can see logs on appium side and it replies immediately a status 200).
Ideally the test would first clean current app, install new one and finally launch it. Could someone give me a clue on how to do that ? Thanks !
ps: I'm using mocha as a test runner, and javascript bindings on the webdriver side. Appium server is running on a mac and I'm launching the script from a PC.
The problem was that appium server had been launched with "--no-reset" argument.
Appium's default behavior is to update the app at each new session. The "--no-reset" flag was preventing it to do so. I originally used it on my dev machine so that I could reduce the waiting time for each test.
So in the end there is nothing specific to do in the code, it's just a matter of appium server configuration.
Note: it appears that this flag will be deprecated on appium 1.5, see documentation.
It will still be possible to setup this behavior by using a new "–default-capabilities" flag.