Build Android App command - Error

Attaching to tutor_local_nginx_1
nginx_1           | 80.67.176.14 - - [07/Apr/2020:08:33:35 +0000] https://blend-ed.com "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0" "-"
nginx_1           | 2020/04/07 08:34:42 [error] 6#6: *3 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 80.67.176.14, server: localhost, request: "GET / HTTP/1.1", upstream: "http://172.18.0.12:8000/", host: "blend-ed.com"
nginx_1           | 80.67.176.14 - - [07/Apr/2020:08:34:42 +0000] https://blend-ed.com "GET / HTTP/1.1" 504 176 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0" "-"
nginx_1           | 80.67.176.14 - - [07/Apr/2020:08:34:43 +0000] https://blend-ed.com "GET /favicon.ico HTTP/1.1" 404 162 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0" "-"
nginx_1           | 2020/04/07 08:35:14 [error] 6#6: *5 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 80.67.176.14, server: studio.localhost, request: "GET / HTTP/1.1", upstream: "http://172.18.0.9:8000/", host: "studio.blend-ed.com"
nginx_1           | 80.67.176.14 - - [07/Apr/2020:08:35:14 +0000] https://studio.blend-ed.com "GET / HTTP/1.1" 504 176 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0" "-"
nginx_1           | 80.67.176.14 - - [07/Apr/2020:08:35:15 +0000] https://studio.blend-ed.com "GET /favicon.ico HTTP/1.1" 404 162 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0" "-"
nginx_1           | 221.229.218.152 - - [07/Apr/2020:08:42:33 +0000] "HEAD / HTTP/1.1" 301 0 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML" "-"
nginx_1           | 221.229.218.152 - - [07/Apr/2020:08:42:33 +0000] "GET / HTTP/1.1" 301 186 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML" "-"
nginx_1           | 221.229.218.152 - - [07/Apr/2020:08:42:59 +0000] https://studio.blend-ed.com "HEAD / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML" "-"
nginx_1           | 61.219.11.153 - - [07/Apr/2020:08:49:27 +0000] "\x01\x02\x03\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 400 174 "-" "-" "-"
nginx_1           | 2020/04/07 08:56:19 [error] 6#6: *11 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 137.97.130.137, server: localhost, request: "GET / HTTP/1.1", upstream: "http://172.18.0.12:8000/", host: "blend-ed.com"
nginx_1           | 137.97.130.137 - - [07/Apr/2020:08:56:19 +0000] https://blend-ed.com "GET / HTTP/1.1" 504 578 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/71.0.3578.98 Chrome/71.0.3578.98 Safari/537.36" "-"
nginx_1           | 2020/04/07 08:56:22 [error] 6#6: *14 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 137.97.130.137, server: studio.localhost, request: "GET / HTTP/1.1", upstream: "http://172.18.0.9:8000/", host: "studio.blend-ed.com"
nginx_1           | 137.97.130.137 - - [07/Apr/2020:08:56:22 +0000] https://studio.blend-ed.com "GET / HTTP/1.1" 504 578 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/71.0.3578.98 Chrome/71.0.3578.98 Safari/537.36" "-"

What kind of server are you running? t3a.medium/t3a.large? If possible, you should upgrade to t3a.large. This is relatively easy to do in AWS, just hit “resize” on your EC2 instance.

1 Like

t3a.medium

I changed it to t3a.large

After upgrading the instance my ip got changed. I configured the new ip, but now even blend-ed.com:3737 is not loading

:hot_face:

That’s good. The extra CPU will be necessary to run the additional ecommerce/discovery services.

This is normal: DNS propagation is slow. You can access your server at youripaddress:3737.

1 Like

Okay. Got it.

So will I be able to load the LMS and studio after some time ?
or should I do something ?

It’s already working from my side:

You should clear your DNS cache to access the LMS and the CMS. This is usually done with ctrl+shift+r.

1 Like

Great !
It worked now.

Thank you so much!

Now I’ll try to build the app.

android build failed at 38%

docker run --rm -it --volume=/home/tutor/.local/share/tutor/env/android:/openedx/config/ --volume=/home/tutor/.local/share/tutor/data/android:/openedx/data/ overhangio/openedx-android:3.11.7
Unable to find image 'overhangio/openedx-android:3.11.7' locally
3.11.7: Pulling from overhangio/openedx-android
5b7339215d1d: Already exists 
14ca88e9f672: Already exists 
a31c3b1caad4: Already exists 
b054a26005b7: Already exists 
7797ed515873: Already exists 
b6e6102be8d1: Already exists 
715f0a1a179c: Already exists 
3943d626315a: Already exists 
7a9b52ad91bf: Already exists 
f36a4c649002: Pull complete 
91d95aa95c2e: Pull complete 
e2fc4684ea11: Pull complete 
580a6a1c5590: Pull complete 
6b9027b570c1: Pull complete 
ed454fd3d6aa: Pull complete 
Digest: sha256:6f2d2dec287a0e645282128049a3a7acd0ed3412b1a35e2c88741146aef6ebde
Status: Downloaded newer image for overhangio/openedx-android:3.11.7
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

> Configure project :OpenEdXMobile
Kotlin plugin should be enabled before 'kotlin-android-extensions'
WARNING: API 'variantOutput.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variantOutput.getPackageApplication(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
WARNING: API 'variant.getConnectedInstrumentTest()' is obsolete and has been replaced with 'variant.getConnectedInstrumentTestProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getConnectedInstrumentTest(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.

> Task :android-iconify:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :OpenEdXMobile:processProdDebuggableResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':OpenEdXMobile:processProdDebuggableResources'.
> Android resource linking failed
  /openedx/edx-app-android/OpenEdXMobile/build/intermediates/merged_manifests/prodDebuggable/AndroidManifest.xml:2: AAPT: error: attribute 'package' in <manifest> tag is not a valid Android package name: 'com.blend-ed'.
      

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 42s
38 actionable tasks: 38 executed
>

Here is the relevant error:

  /openedx/edx-app-android/OpenEdXMobile/build/intermediates/merged_manifests/prodDebuggable/AndroidManifest.xml:2: AAPT: error: attribute 'package' in <manifest> tag is not a valid Android package name: 'com.blend-ed'.

This error is new to me. It appears to be caused by the dash (“-”) in your domain name “blend-ed.com”.

Indeed: Configure the app module  |  Android Studio  |  Android Developers

And although the application ID looks like a traditional Java package name, the naming rules for the application ID are a bit more restrictive:

  • It must have at least two segments (one or more dots).
  • Each segment must start with a letter.
  • All characters must be alphanumeric or an underscore [a-zA-Z0-9_].

This bug will require that I make a new Tutor release and that you upgrade your locally-installed Tutor version. Shall we do that?

1 Like

You can now upgrade to 3.11.9, as before:

sudo systemctl stop tutor-webui
sudo curl -L "https://github.com/overhangio/tutor/releases/download/v3.11.9/tutor-Linux_x86_64" -o /usr/local/bin/tutor
sudo chmod +x /usr/local/bin/tutor
sudo systemctl restart tutor-webui
tutor config save

You may have to rebuild your images: tutor images build openedx

And then you can run quickstart again.

Thanks for your patience, I think we are getting close to resolution.

1 Like

It worked !
Thank you so much for finding time to help me !

the bad news is that the app crashes while taking courses / clicking register.