-
Notifications
You must be signed in to change notification settings - Fork 115
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
Cavy timing out on the Android release build of a new project #186
Comments
Hmmm interesting - I haven't come across this issue before. Can you let me know what version of cavy you're running in your app? |
Yeah |
Ahhh thank you! I'm doing a bit of digging into this issue for you. Cavy 4.0 uses websockets to connect to cavy-cli and it seems as though this change is what has caused this issue. Apps running tests in debug seem to be unaffected - the issue seems to be with release versions only. Cavy 3.4.1 (before introduction of websockets) seems to have no problem running tests in release builds. I'll continue investigating, but if you manage to make any headway in the meantime, please update on here! Thanks :) |
I too have stumbled on this issue, and I'm looking for a fix. I experimented downgrading cavy to 3.4.1 but no dice, it still just sits there and times out. |
I was able to debug this issue by log the websocket error # <root>/node_modules/cavy/src/Reporter.js
export default class Reporter {
onStart() {
const url = 'ws://127.0.0.1:8082/';
this.ws = new WebSocket(url);
+ this.ws.onerror = console.error
} The output shown that the websocket was failed to open due to this issue Cleartext HTTP traffic not permitted. In my case, the issue was resolved by adding |
I am probably missing something basic, but I created a new RN app today (
react-native init
), installed and setup Cavy, ran the sample tests successfully on Android (cavy run-android
) but cannot get it to work when running the Android release build (cavy run-android --variant release
).The app gets built and installed on the emulator but there is some sort of communication problem and cavy times out (with no tests seemingly run). This is what I see in the terminal:
One weird thing is that I can run cavy fine in another (older) project on Android in our release builds... but not with Hermes enabled. (That problem with Hermes is what I was trying to look into, but this issue is blocking that... and to be clear Hermes is disabled in the scenario I describe above).
Does this ring a bell for anyone?
Thanks!
The text was updated successfully, but these errors were encountered: