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

Android Application stuck at Splashscreen #20274

Closed
M47h13u opened this issue Jul 18, 2018 · 3 comments
Closed

Android Application stuck at Splashscreen #20274

M47h13u opened this issue Jul 18, 2018 · 3 comments
Labels
Platform: Android Android applications. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.

Comments

@M47h13u
Copy link

M47h13u commented Jul 18, 2018

Environment

Android any version

package.json:

"react": "16.0.0-alpha.6",
"react-native": "0.43.3",
"react-native-navigation": "1.1.398",
"redux": "^3.7.0",
"redux-logger": "^3.0.1",
"redux-observable": "^0.14.1",
"redux-persist": "^4.8.1",
"redux-persist-transform-filter": "0.0.13",
"react-redux": "^5.0.5",

Description

In debug mode, when I enable "don't keep activities" and then launch my application it crashes and display this log in android studio logcat:

E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #8
Process: com.situaction, PID: 20329
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.IllegalStateException: closed
at okhttp3.internal.ws.RealWebSocket.close(RealWebSocket.java:164)
at com.facebook.react.packagerconnection.ReconnectingWebSocket.closeWebSocketQuietly(ReconnectingWebSocket.java:110)
at com.facebook.react.packagerconnection.ReconnectingWebSocket.closeQuietly(ReconnectingWebSocket.java:103)
at com.facebook.react.packagerconnection.JSPackagerClient.close(JSPackagerClient.java:96)
at com.facebook.react.devsupport.DevServerHelper$2.doInBackground(DevServerHelper.java:158)
at com.facebook.react.devsupport.DevServerHelper$2.doInBackground(DevServerHelper.java:154)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
at java.lang.Thread.run(Thread.java:761) 

In release mode it makes the application freeze at splashscreen

Code

index.js:

import Situaction from '@situaction/App';

const app = new Situaction();

situaction/App.js

import React from 'react';

import { Provider } from 'react-redux';

import { registerScreens } from '@screens/';

import store from '@situaction/store';

import { startLogin } from '@screens/goToLogin'
import { startLoading } from '@screens/goToLoading'

import Config from 'react-native-config'

import * as session from '@session/';

// Init registers screens
registerScreens(store, Provider);

export default class Situaction {
  constructor() {
    if (__DEV__) {
      console.log(Config);
    } else {
      console.disableYellowBox = true; // -> Disable Warning in RELEASE
    }

    // LINK STORE REDUX TO APP
    const unsubscribe = store.subscribe(() => {
			if (store.getState().services.persist.isHydrated) {
				unsubscribe();
				this.autoLogin();
			}
		});
  }

  // AUTO LOGIN CHECK IF SESSION EXIST AND VALIDITY
  autoLogin() {
    session.refreshToken().then(() => {
      startLoading() // HAVE SESSION
    }).catch(() => {
      startLogin() // NO SESSION
    });
	}
}
@react-native-bot
Copy link
Collaborator

It looks like your issue may be missing some necessary information. Can you run react-native info and edit your issue to include these results under the Environment section?

@M47h13u
Copy link
Author

M47h13u commented Jul 18, 2018

$ react-native info:

Scanning 741 folders for symlinks in E:\insitumobile3\node_modules (42ms)

Unrecognized command 'info'
Run react-native --help to see list of all available commands

@radko93 radko93 added Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. ⏪Old Version labels Jul 18, 2018
@radko93
Copy link
Contributor

radko93 commented Jul 18, 2018

Please reproduce this with latest react native version and open another issue when this problem occurs.

@radko93 radko93 closed this as completed Jul 18, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Jul 18, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants