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

Component fails to render after starting/initialising thread in iOS #35

Open
ghost opened this issue Jul 2, 2018 · 2 comments
Open

Comments

@ghost
Copy link

ghost commented Jul 2, 2018

Hi, In my app i have a side-menu as well which works perfectly fine for the android app, but in iOS the side-menu fails to render anything as soon as I start the thread by calling
this.thread = new Thread('Thread.js')
Now i cannot even debug from React-native-debugger/remote debugging as using it will cause thread itself to throw error package manager is not running which is already an open issue.
Is there something I am missing to initialise the app properly for iOS app.

@Traviskn
Copy link
Contributor

Sorry I have no idea what could be causing this issue. It could be that you have unrelated code that is trying to call methods on this.thread before it is defined, or some other error. Even if the JS code in your thread module crashes entirely, it is running in a completely separate process and would not have any impact on your main react native js ui.

@Traviskn
Copy link
Contributor

Something you could try is to wrap your thread instantiation code in a try/catch block and log the error with console.error so that you can see the message even without having remote debugging enabled:

try {
  this.thread = new Thread('Thread.js');
} catch (e) {
  console.error('ERROR INSTANTIATING THREAD: ', e); // depending on what sort of error is being thrown, you may need to pass e.message to console.error to get more valuable info
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant