-
Notifications
You must be signed in to change notification settings - Fork 34
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
Scripts and documentation for building the app are outdated #958
Comments
e-mission/e-mission-docs#958 Because we bundle all the JS with Webpack now, we need to download the settings control upfront. We can add an npm script that does this and call it during setup_shared_native.sh (because it will be needed for both iOS and android platforms).
@niccolopaganini Can you verify that this works on your machine? Then, you can update the README to reflect the updated workflow:
|
To summarize my discussion with @JGreenlee, I cloned his branch but did not seem to work on my machine. Just to make sure, I made sure the local repo was up-to-date, but again, doesn't seem to build correctly. Now that the branch is merged, @JGreenlee will try running it again in his computer to see if the build works and then I will go ahead and try. |
Here are the steps I followed:
At this point I realized e-mission/e-mission-phone#1022 was only merged into So I start over:
And repeat the same steps, but using
|
I tried re-running the prereq install:
But that failed too:
|
It looks like this may be a hardware issue We also then need to see why the CI is broken (doesn't appear to be the same issue) and fix it. EDIT: The CI is in fact broken due to the same issue This is a recent regression, so hopefully the SDK install upgrade should fix this. We should also add a badge for the SDK install CI workflow to the README to increase the visibility of breakages. |
can you check |
Reformatting everything for better clarity... |
On my personal laptop & work laptop, running open jdk 11.0.19, the existing build process works. Commands that I ran for the tests:
Build was successfulEdit:
|
On my same personal computer, I switched to the latest JDK through homebrew by
Then I ran the following commands:
This process went similarly... Then I ran
for which I got this output the first and only time:
Errors:
which seems to be same/ similar as what @JGreenlee encountered |
@niccolopaganini are you going to update the errors that you encountered before last week to validate the findings from the CI (aka that this is a recent regression)? |
wrt
@JGreenlee was able to fix them by switching to the correct branch (#958 (comment)). Can you see why this didn't fix it for you? Also, these errors (around missing files) have nothing directly to do with the java version. Are you sure that there are not errors earlier related to the java version? Also, are you using the same folder for build against the old and new java versions? If so, why do you need to re-clone? Or is there an |
Given that @niccolopaganini is seeing this on his personal laptop (ARM) as well, this doesn't appear to be a hardware issue. It is also interesting that this is a regression in the past week |
For the record, it is not unusual to include the HAXM in the list of modules. I see it in other repos as well, although potentially installed using different commands. We haven't changed any of this code Passed Aug 26 Note also that there are no changes to master between Aug 26th and Sep 2nd |
I can confirm that the non-updated SDK install doesn't work on my laptop either although it worked when I was working on
Let's see whether upgrading the CLI will fix it. |
Digging a bit deeper, HAXM has not been supported for OSX 10.x+ And it looks like the last successful run of the SDK install was on OSX 12.6.7
So here's what I think:
If I am right, then the switch to most recent CLI tools will not help. We just have to remove the package |
Not sure if this addresses the situation but: https://developer.android.com/studio/run/emulator-acceleration
<screenshot below for exact comment; article above from which I took the screenshot> |
I actually don't think that quote is related. The context around it is
However, the same page has the following text about Mac
I've been trying to find where the sdkmanager downloads its package repository from to see if we can check its change management but I think we're going to have to check the source code to figure it out. And I am not sure that is worth it given that HAXM is not supported on OSX since 10.10 I will upgrade to the most recent CLI tools anyway (since it is a good thing to stay up to date) but will also remove the haxm package from the install list |
I can confirm that if I remove the HAXM emulator, even the current install prereq succeeds
|
After upgrading to the most recent version of OpenJDK (17)
Android SDK install succeeds
And an android build in an existing checked-out repo succeeds
Albeit with several deprecated APIs
|
For the record, it is very annoying that the Android SDK randomly removes packages from their download store without some form of release notes, but I guess that is what you get if you have a monopoly. And that's why we have CI, so that we can detect these regressions in the dependencies and resolve them in a timely fashion instead of waiting until people notice it. We should restore the CI badge for the prereq install to the README.
|
This addresses updating the SDK tools to the latest versions: e-mission/e-mission-docs#934 (comment) And removing the obsolete HAXM package: e-mission/e-mission-docs#958 (comment) It also updates the README to indicate the required java version after the upgrade e-mission#1016 (comment) e-mission#1016 (comment) Testing done: After upgrading to the most recent version of OpenJDK (17) ``` $ java --version openjdk 17.0.8.1 2023-08-24 OpenJDK Runtime Environment Temurin-17.0.8.1+1 (build 17.0.8.1+1) OpenJDK 64-Bit Server VM Temurin-17.0.8.1+1 (build 17.0.8.1+1, mixed mode, sharing) ``` Android SDK install succeeds ``` $ bash setup/prereq_android_sdk_install.sh --------------------------------------- Accept? (y/N): Y [=======================================] 100% Unzipping... android-12/zipalign END: Done with android SDK download, exiting script ``` And an android build in an existing checked-out repo succeeds ``` $ npm run build-dev-android BUILD SUCCESSFUL in 33s 52 actionable tasks: 12 executed, 40 up-to-date Built the following apk(s): .../platforms/android/app/build/outputs/apk/debug/app-debug.apk ``` Albeit with several deprecated APIs ``` w: /Users/kshankar/in-house/openpath-phone/platforms/android/app/src/main/java/com/adobe/phonegap/push/FCMService.kt: (169, 17): 'get(String!): Any?' is deprecated. Deprecated in Java w: /Users/kshankar/in-house/openpath-phone/platforms/android/app/src/main/java/com/adobe/phonegap/push/FCMService.kt: (316, 20): 'get(String!): Any?' is deprecated. Deprecated in Java w: /Users/kshankar/in-house/openpath-phone/platforms/android/app/src/main/java/com/adobe/phonegap/push/FCMService.kt: (627, 33): 'constructor Builder(Context)' is deprecated. Deprecated in Java w: /Users/kshankar/in-house/openpath-phone/platforms/android/app/src/main/java/com/adobe/phonegap/push/FCMService.kt: (1190, 37): 'fromHtml(String!): Spanned!' is deprecated. Deprecated in Java w: /Users/kshankar/in-house/openpath-phone/platforms/android/app/src/main/java/com/adobe/phonegap/push/PushPlugin.kt: (97, 25): 'get(String!): Any?' is deprecated. Deprecated in Java ```
Fixed in e-mission/e-mission-phone#1037 |
Attempting to build
e-mission-phone
has a few additional steps now that we incorporated webpack.We should revise the scripts so that we don't have to manually do these extra steps. We should also generally explain the build process more effectively in the README.
Cloning
e-mission-phone
and attempting to build it without doing anything extra yields the following output:1st and 2nd Errors
Notice that
collect-settings.js
andsync-settings.js
are not found when bundling.We can resolve this by having
download_settings_controls.js
be run by the 'setup serve' script. I will make this change and link to the PR here.3rd Error
lo.json
(the Lao language) was not present until recently. During setup,e-mission-phone
, clonese-mission-translate
into a subdirectorylocales
. By default, this instance ofe-mission-translate
points at themaster
branch.The master branch doesn't have the Lao language (
lo.json
is not there).This can be remedied by quickly going into the locales folder and running
git checkout master_for_platform
.(something like
cd locales && git checkout master_for_platform && cd ..
)I could change
download_translation.js
to default to themaster_for_platform
branch. Butmaster_for_platform
should be getting merged tomaster
soon anyway so I think we can just deal with it temporarily.The text was updated successfully, but these errors were encountered: