Allow clear text traffic in debug build #241
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi. I'm trying to learn how turbo-android should work, so I cloned this repo and the turbo-native-demo repo. I was able to start the android app on an emulator and it loaded the content from the official site. Perfect :)
Then I made this change to hook it up with my local clone of
turbo-native-demo
:Unfortunately it did not work. I checked loading the local server from a browser on the emulator and it loaded everything, so I opened up
adb logcat
to investigate what's happening and found this pattern:Finally I found that the error description is
net::ERR_CLEARTEXT_NOT_PERMITTED
which could happen if you try to load an unencrypted plain text without the proper permissions (docs). I added the missing permission to the debug build type and it fixed it immediately. (I don't think we should add this permission to the release build type to encourage a more secure setup in the demo app.)I hope this PR helps others to become familiar with this cool project easier :)