-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Regex for Android bundle id causing failures #924
Comments
Okay, let's debug it. Run your app on the emulator and run the command you mentioned
Does it print more specific errors? |
Thanks noomorph, when I run
No error message returns, it just makes a new line. |
For what it's worth, the old way works
|
@tomatobrown , weird. Can you pipe |
here it is @noomorph |
Thanks. I'll look at it first thing tomorrow |
@tomatobrown , I've found the issue. Your ps output somehow returns ^M line breaks (with DOS endings). I have no slightest idea why but I'll try to extend the regexp for this case. |
Thanks @noomorph and for what it's worth, I've confirmed that this same issue exists on at least 3 other Mac's other than mine, so I think the issue might be bigger than it appears. |
It's still weird nevertheless. I hope to finish the PR soon, but out of curiosity what emulator and SDKs are you using? On our CI it passes alright and locally I could not reproduce. Thanks for dumping adb ps output into a file. Otherwise, I would not be able to fix your issue. |
I've been using a Nexus 5 - with Android 7.1.1 (Nougat) |
@DanielMSchmidt could you please take a look |
@tomatobrown , I have one more request, could you dump also your
into a text file as-is? |
@tomatobrown , I was looking at this StackOverflow issue and it made me wonder... which shell you are using? Are you sure your tty is not something exotic? |
Here it is: I'm just using the terminal on High Sierra |
@tomatobrown , something's wrong... it has DOS CRLF line endings too. It's not good. If my memory does not fail me, you're the first developer who reports this particular issue. Should I tell you that I have more than four different PCs (running Windows 10, Ubuntu 18.04, MacOS Sierra, MacOS High Sierra) in my household + I look at our Jenkins CI? And still I was not able to reproduce your issue... What is even worse - I just have realized that in order to fix it, I might need to rewrite the whole ADB helper class in Detox. And that won't get me closer to the source of your issue, which is very daunting. One more thing. Dump this command And ping me directly (the email is in my profile). I might need your further assistance in this later on. Thanks for the cooperation. |
I can reproduce the issue together with two friends of mine, all on
slightly different hardware
|
This also happened to both our build and local tests. The only strange behavior that it works for apks built for debug but not for release ones. We're using MacOS High Sierra iTerm/Terminal. Out stop gap solution was to downgrade to v8.0.0 |
Using Mac - High Sierra
Description
Line 113 of src/devices/android/ADB.js is:
const bundleIdRegex = pipeCommands.escape.inQuotedRegexp(bundleId) + '[ ]*$';
I'm not sure what the
'[ ]*$'
is for, or maybe I'm building my application incorrectly. I'm only able to get detox 9.0.1 to work correctly when I delete the+ '[ ]*$'
from that file. I know this is somewhere between and an issue and a question, but can someone clear this up for me.Sample error:
detox[9144] ERROR: [exec.js/EXEC_FAIL, #19]
detox[9144] ERROR: [exec.js/EXEC_FAIL, #20] "/Users/me/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell ps | grep "com.myapp.myappportal[ ]*$"" failed with code = 1, stdout and stderr:
The text was updated successfully, but these errors were encountered: