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
[TIMOB-25766] (7_0_X) Android: Revert Android related base64 changes #9812
Conversation
Generated by 🚫 dangerJS |
The revert and skipped test look right to me. I'd strongly prefer we actually added a test case for this exact scenario so we can avoid the regression in the future. Also, Ideally we'd not just revert but fix the issue in a way that avoids this regression and supports the test case we're skipping again. |
@sgtcoolguy I have one good to go for Android, I just need to test iOS and Windows to ensure I don't break any existing builds, I'll make a PR to mocha-suite Monday |
@sgtcoolguy The issue was including opening the camera / photo gallery which cannot be handled via unit-tests. Maybe a good case for our appium-suite (cc @SamJHaig) |
You don't need to use the camera/photo gallery to test it out. I'm digging into this now to write up some tests. |
We could also use a large image and change its encoding to see the mismatch. Okay |
The issue was caused by the blob's byte array being wrongly transcoded to UTF-16 (which changed the binary) before being base64 encoded. So, a simple test would be to create a binary blob from a stream/buffer and then verify that it base64 encodes it correctly. Doing it this way will make the returned result predictable. |
JIRA: https://jira.appcelerator.org/browse/TIMOB-25766