app not loading without error

Hello,
I have detached app that is working fine on IOS but on Android it stays on the slash screen with the logo without having any error.
Below the logs if it can help, only the last part, when the app is loading:

I/ReactNativeJS: [APP] Starting Yamble 0.7.0
    [APP] setup sentry
I/ReactNativeJS: [sentry-expo] Automatically skipping Sentry initialization in development. Note you can set Sentry.enableInExpoDevelopment=true before calling Sentry.config(...).install()
    [APP] register root component
I/ReactNativeJS: Running application "main" with appParams: {"initialProps":{"exp":{"initialUri":"expa2aeda4b65d942dfa56e48805998c4aa://","manifest":{"iconUrl":"http://192.168.86.220:19001/assets/./Logo-grey-1024.png","isVerified":true,"hostUri":"192.168.86.220:19000","version":"0.7.0","slug":"yamble","name":"Yamble","scheme":"expa2aeda4b65d942dfa56e48805998c4aa","logUrl":"http://192.168.86.220:19000/logs","splash":{"resizeMode":"contain","backgroundColor":"#FFFFFF","image":"./Logo-grey-1024.png","imageUrl":"http://192.168.86.220:19001/assets/./Logo-grey-1024.png"},"privacy":"unlisted","orientation":"portrait","detach":{"androidExpoViewUrl":"https://s3.amazonaws.com/exp-exponent-view-code/android-v2.9.2-sdk31.0.0-d1776f37-d524-4fee-872d-6807b0fd83ff.tar.gz","iosExpoViewUrl":"https://s3.amazonaws.com/exp-exponent-view-code/ios-v2.9.0-sdk31.0.0-250a3991-b623-4f9c-b07f-0b9ed7e8c4c9.tar.gz"},"facebookScheme":"fb189680458530225","loadedFromCache":true,"bundleUrl":"http://192.168.86.220:19001/./App.bundle?platform=android&dev=true&minify=false&hot=false&assetPlugin=C%3A%5CUsers%5Csnoof%5CDocuments%5Cproject%5CupdateFirebase%5Cyamble-react-native%5Cnode_modules%5Cexpo%5Ctools%5ChashAssetFiles.js","ios":{"buildNumber":"1","publishManifestPath":"ios/yamble/Supporting/shell-app-manifest.json","bundleIdentifier":"com.yamble.yamble","publishBundlePath":"ios/yamble/Supporting/shell-app.bundle"},"packagerOpts":{"dev":true,"lanType":"ip","hostType":"lan","minify":false,"urlRandomness":"yf-kac"},"primaryColor":"#FF9300","entryPoint":"./App.js","android":{"package":"com.yamble.k","publishManifestPath":"android/app/src/main/assets/shell-app-manifest.json","versionCode":1,"publishBundlePath":"android/app/src/main/assets/shell-app.bundle"},"androidStatusBar":{"backgroundColor":"#FFFFFF","barStyle":"dark-content"},"debuggerHost":"192.168.86.220:19001","isDetached":true,"env":{},"icon":"./Logo-grey-1024.png","sdkVersion":"31.0.0","mainModuleName":"./App","xde":true,"id":"@anonymous/yamble-b48571ed-891c-47e0-9361-1f0632716edf","developer":{"tool":"expo-cli","projectRoot":"C:\\Users\\snoof\\Documents\\project\\updateFirebase\\yamble-react-native"}},"shell":true}},"rootTag":1}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
D/FlurryAgent: isInstantApps dependency is not added
I/com.yamble.k: Background concurrent copying GC freed 84943(5MB) AllocSpace objects, 4(80KB) LOS objects, 48% free, 6MB/12MB, paused 1.728ms total 183.152ms
W/FlurryAgent: Flurry session started for context:host.exp.exponent.MainActivity@8ca8859
W/FlurryAgent: Flurry session resumed for context:host.exp.exponent.MainActivity@8ca8859
I/ReactNativeJS: Versions: 281 : Flurry_Android_281_11.4.0 : 0
I/FlurryAgent: New main file also not found. returning..
D/FlurryAgent: Referrer file contents: null
I/FlurryAgent: Agent report type: main device
D/FlurryAgent: Flushing deferred events queues.
W/com.yamble.k: Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (light greylist, reflection)
W/com.yamble.k: Accessing hidden method Ljava/net/InetAddress;->isNumeric(Ljava/lang/String;)Z (light greylist, reflection)
W/com.yamble.k: Accessing hidden field Ljava/io/FileDescriptor;->descriptor:I (light greylist, JNI)
W/com.yamble.k: Accessing hidden method Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy; (light greylist, linking)
W/com.yamble.k: Accessing hidden method Ldalvik/system/BlockGuard$Policy;->onNetwork()V (light greylist, linking)
W/FlurryAgent: Analytics report sent.

EDIT: I just modified app.js by adding a new ligne and saving, the app loaded perfectly…
Am I missing something?

I have found where the issue is. it is because of the below code. Basically the connectionChange event does not work properly during the initial launch, it works as expected when the code is reloaded after a change.
Don’t know how to fix it…

import { ConnectionInfo, NetInfo } from "react-native"
import { Observable, Observer } from "rxjs"
import { publishReplay, refCount, tap } from "rxjs/operators"

export const connectivityStatus$: Observable<ConnectionInfo> = Observable.create((observer: Observer<ConnectionInfo>) => {
  const handler = observer.next.bind(observer)
  NetInfo.addEventListener("connectionChange", handler)
  return () => NetInfo.removeEventListener("connectionChange", handler)
}).pipe(
  tap((s: ConnectionInfo) => {
    if (process.env.NODE_ENV === "development") {
      console.log("Connection type:", s.type)
    }
  }),
  publishReplay(),
  refCount(),
)

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.