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

[WIP] android jcenter fix #1143

Merged
merged 2 commits into from
Jan 13, 2022
Merged

Conversation

daniellacosse
Copy link
Contributor

Jcenter/bintray is broken, but our cordova-android fetches from there. Fix for this was introduced July of last year.

@daniellacosse daniellacosse temporarily deployed to Test January 12, 2022 21:50 Inactive
Copy link
Collaborator

@fortuna fortuna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks fine, but we need to confirm if storage if preserved after an upgrade.

@daniellacosse
Copy link
Contributor Author

The change looks fine, but we need to confirm if storage if preserved after an upgrade.

I presume setting <preference name="AndroidInsecureFileModeEnabled" value="true" /> isn't a viable option?

Is everything exclusively stored via local storage? I haven't tested it yet, but if so it's very likely this will dump everyone's configs.

@daniellacosse
Copy link
Contributor Author

The change looks fine, but we need to confirm if storage if preserved after an upgrade.

I presume setting <preference name="AndroidInsecureFileModeEnabled" value="true" /> isn't a viable option?

Is everything exclusively stored via local storage? I haven't tested it yet, but if so it's very likely this will dump everyone's configs.

seems mostly like it's the language of choice, unless vscode is hiding results from me again

https://github.com/Jigsaw-Code/outline-client/blob/0571eafe2d14a33b2e3bb8c329169fefcc2805bb/src/www/app/app.ts#L249-L250

@fortuna
Copy link
Collaborator

fortuna commented Jan 13, 2022

We use localStorage for everything: https://github.com/Jigsaw-Code/outline-client/search?q=localStorage&type=

We had to migrate uses on iOS from file:// to app://localhost once and it was a pain. You'll see the code there.

I think the AndroidInsecureFileModeEnabled is ok, since we don't load files from file:// that we don't trust.
I'm ok with setting that, but I want to make sure the data is preserved in that case too. And if we are testing that the data is preserved, we might asa well test without that option too.

Copy link
Collaborator

@fortuna fortuna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know when you have verified it's working with the update.

@daniellacosse
Copy link
Contributor Author

We use localStorage for everything: https://github.com/Jigsaw-Code/outline-client/search?q=localStorage&type=

We had to migrate uses on iOS from file:// to app://localhost once and it was a pain. You'll see the code there.

I think the AndroidInsecureFileModeEnabled is ok, since we don't load files from file:// that we don't trust. I'm ok with setting that, but I want to make sure the data is preserved in that case too. And if we are testing that the data is preserved, we might asa well test without that option too.

In the search you linked, the only call to setItem was to the overrideLanguage key, so you can understand my confusion. I assume then that some third-party is using it somehow.

Apologies on the delay, I'm trying to figure out how best to do this.

@daniellacosse daniellacosse temporarily deployed to Test January 13, 2022 18:35 Inactive
Copy link
Contributor Author

@daniellacosse daniellacosse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I was being a bit silly - I never got the android app to build on my local mac and was trying to see if I could solve that, either with Android Studio w/ Blaze (recency bias 😅) or manually - only to realize I can't build the old version locally because of this very issue!!

Then, of course, I remembered that the build system has been building versions of the android app this whole time 🤦 . Here are the builds of note while I struggle to figure out what how to install each apk on my emulator:

My main concern right now is - will the emulator preserve localStorage across the different apks? Or does it treat each as its own separate app? I don't even know how that works.

@@ -0,0 +1 @@
1.8
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was useful while trying to get the app to build on my local machine. jenv uses it to manage which version of java it should use - our app uses v1.8 while android studio with blaze defaults to 11.0.11

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a question for @fortuna , shall we upgrade Java to a newer version considering we are approaching the end-of-support time of Java 8: https://endoflife.date/java.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's upgrade to the newest Java if we can. But in another PR

Copy link
Collaborator

@fortuna fortuna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's submit this as is to unblock the other stuff, with the understanding that we still need to test it.

@fortuna fortuna marked this pull request as ready for review January 13, 2022 22:50
@daniellacosse daniellacosse merged commit e3fc196 into master Jan 13, 2022
@fortuna fortuna deleted the daniellacosse/jcenter-android-fix branch July 21, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants