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

Detox hangs on device.init() for IOS tests #804

Closed
brad-miller1 opened this issue Jun 29, 2018 · 15 comments
Closed

Detox hangs on device.init() for IOS tests #804

brad-miller1 opened this issue Jun 29, 2018 · 15 comments

Comments

@brad-miller1
Copy link

brad-miller1 commented Jun 29, 2018

No description provided.

@rotemmiz
Copy link
Member

Simulator log
Log with debug sync

@rotemmiz
Copy link
Member

rotemmiz commented Jul 5, 2018

Log with debug sync is still missing

@rotemmiz
Copy link
Member

rotemmiz commented Jul 9, 2018

Why did you delete all comments? 😐
What was your solution?

@brad-miller1
Copy link
Author

It is still not resolved, but I closed because my company would prefer I not post the logs. Thanks

@rotemmiz
Copy link
Member

rotemmiz commented Jul 9, 2018

🙁

@thymikee
Copy link
Contributor

thymikee commented Jul 12, 2018

@rotemmiz I face similar issue in a RN v0.55 project on iOS simulator (any kind).

In debug, most of the time detox.init() hangs (the isReady message doesn't get a response from WS server, to be specific). However, if I re-start packager, the init somehow succeeds, just to not being responsive when awaiting an element by.id() for example.
In release it doesn't ever get past init.

However, if I bootstrap the app with a different view (more heavily packed with requests to server) it gets the ready message back and seems to work most of the time.

Sadly I cannot post a repro now, because it's a disclosed project.

Any ideas why this might happen? Tried on Node 10.5, 10.6, 8.11, 8.7, [email protected] and [email protected].

@thymikee
Copy link
Contributor

Turned out it was hanging because of infinite animation I had on a screen.

@brad-miller1
Copy link
Author

If this might help anyone, it turns out Cylance (
anti-virus) was blocking the app from connecting in my case.

@noomorph
Copy link
Collaborator

@brad-miller1 , any ideas on how to detect such cases? Could you describe how did you come to this conclusion and what can be a symptom for this? I'd like to add some helper code that will detect this kind of issue to prevent similar bug reports in future.

@brad-miller1
Copy link
Author

I ended up finding it in my system logs, I have to leave out some of the details, but the log message was something like this:

Jul 10 00:45:50 ******* CylanceSvc[91]: process Blocked by policy - path:/Users/********** pid:12880 violation:DyldInjection occurrences:1 SHA:*********

@noomorph
Copy link
Collaborator

@brad-miller1 , did you check what operation got enabled after you "lifted the ban"? Was it opening detox-server on a specifc port, or detox-server to simulator communication? I'd be happy to hear any extra input, since it maybe helpful to the other users.

@noomorph
Copy link
Collaborator

I mean it could be cool to add a stricter error handler which will throw a fatal exception instead of hanging up. :)

@brad-miller1
Copy link
Author

Basically it was not allowing the app to connect to the detox server, it was not able to connect and therefore could not send the response that the app was ready

@noomorph
Copy link
Collaborator

@brad-miller1 , thank you very much!!! 👍
I'll find some time to investigate this.

@brad-miller1
Copy link
Author

Your welcome! It would be great if it could somehow log this type of error so it would be easier to debug! Let me know if I can provide any other info, thanks!

@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants