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

Tests on Android doesn't load global variables #1311

Closed
1 task done
sergiomap opened this issue Apr 18, 2019 · 3 comments
Closed
1 task done

Tests on Android doesn't load global variables #1311

sergiomap opened this issue Apr 18, 2019 · 3 comments

Comments

@sergiomap
Copy link

Describe the bug
I'm running tests in my app for android and iOS. For iOS everything works fine, but on Android it seems doesn't load the global variables "element" and "device" at "detox.init(config);"

To Reproduce

  • I have tested this issue on the latest Detox release and it still reproduces

First, I run:

detox build -c android.emu.debug
then:
detox test ./e2e -c android.emu.debug -l verbose

and then I get the errors:

  • ReferenceError: device is not defined
  • ReferenceError: element is not defined

I tested on demo project "demo-react-native" with the same versions that I'm using and it works fine. The difference is that I have more dependencies on package.json.
I'm using Jest but I also get the error with Mocha.

So, can it be dependencies conflict or something missing at DetoxTest.java related with my app?
I have everything configured according to your documentation.

Expected behavior
Load the global variables at "detox.init(config)".

Environment (please complete the following information):

  • Detox: 12.3.0
  • Jest: 24.7.1
  • React Native: 0.58.6
  • Node: v10.15.3
  • Device: Android emulator and real device
  • OS: Mac OS Mojave 10.14.4

Device and Verbose Detox Logs
Device and Detox logs attached
detox.log
device.log

@noomorph
Copy link
Collaborator

detox[65034] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://192.168.5.229:8099
2019-04-18 10:28:04.006 8962-9076/com.app.debug D/WebSocketClient: Retrying...
2019-04-18 10:28:04.006 8962-9076/com.app.debug I/WebSocketClient: At connectToServer
2019-04-18 10:28:07.036 8962-9108/com.app.debug D/WebSocketClient: Retrying...
2019-04-18 10:28:07.037 8962-9108/com.app.debug I/WebSocketClient: At connectToServer
2019-04-18 10:28:10.065 8962-9118/com.app.debug D/WebSocketClient: Retrying...
2019-04-18 10:28:10.065 8962-9118/com.app.debug I/WebSocketClient: At connectToServer
2019-04-18 10:28:13.092 8962-9131/com.app.debug D/WebSocketClient: Retrying...
2019-04-18 10:28:13.092 8962-9131/com.app.debug I/WebSocketClient: At connectToServer
2019-04-18 10:28:16.118 8962-9141/com.app.debug D/WebSocketClient: Retrying...
2019-04-18 10:28:16.118 8962-9141/com.app.debug I/WebSocketClient: At connectToServer
2019-04-18 10:28:19.147 8962-9153/com.app.debug D/WebSocketClient: Retrying...
2019-04-18 10:28:19.147 8962-9153/com.app.debug I/WebSocketClient: At connectToServer
2019-04-18 10:28:22.177 8962-9167/com.app.debug D/WebSocketClient: Retrying...
2019-04-18 10:28:22.177 8962-9167/com.app.debug I/WebSocketClient: At connectToServer
2019-04-18 10:28:25.202 8962-9180/com.app.debug D/WebSocketClient: Retrying...
2019-04-18 10:28:25.202 8962-9180/com.app.debug I/WebSocketClient: At connectToServer
2019-04-18 10:28:28.230 8962-9189/com.app.debug D/WebSocketClient: Retrying...

Device can't connect to Detox Server, looks like a misconfiguration issue to me. Check that you can actually access it via ws://192.168.5.229:8099.

@support
Copy link

support bot commented Apr 18, 2019

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the detox tag.

@support support bot closed this as completed Apr 18, 2019
@sergiomap
Copy link
Author

When I check 192.168.5.229:8099 it says "Upgrade Required". What kind of upgrade?

@lock lock bot locked as resolved and limited conversation to collaborators Apr 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants