mattermost-mobile: App built from github is block in start screen

Summary

App built from github is not working.

Environment Information

  • Device Name: Samsung Galaxy A5
  • OS Version: Android 8.0.0, Samsung Experience 9.0, Knox 3.1, Knox API 25, TIMA 3.3.0
  • Mattermost App Version: Github master branch
  • Mattermost Server Version: Mattermost Enterprise Edition

Steps to reproduce

Launch the app after build with following step.

  1. Get code from github master branch

  2. Replace android\app\google-services.json with google-services.json

  3. Add these to android\app\build.gradle

dependencies { implementation ‘com.google.firebase:firebase-core:16.0.1’ } //bottom of the file apply plugin: ‘com.google.gms.google-services’

  1. Change value with google-services.json to android\app\src\main\AndroidManifest.xml <meta-data android:name="com.wix.reactnativenotifications.gcmSenderId" android:value="563680424932\"/>

  2. Copy assets\base\config.json to assets\override\config.json and change value

“DefaultServerUrl”: “http://35.194.214.80:8066”, “AutoSelectServerUrl”: true,

  1. In mac console, use environments:

export id1=com.dyna.mattermosta export id2=$id1.MattermostShare export VERSION_NUMBER=1.0.2 export BUILD_NUMBER=2 export APP_NAME=“DynaMattermostA” export MAIN_APP_IDENTIFIER=$id1 export SUPPLY_PACKAGE_NAME=$id1 export EXTENSION_APP_IDENTIFIER=$id2

  1. In mac console, use make build-android && make run-android Mac Information: macOS High Sierra version 10.13.6 (17G65) Mac mini (Mid 2011) XCode Version 9.3 (9E145)

Expected behavior

After launch the app. It always stay in this screen.

Observed behavior

In the adb logcat. I found this error with ReactNative.

2018-10-31 14:07:50.428 22780-23537/com.dyna.mattermosta E/unknown:ReactNative: Exception in native call java.lang.RuntimeException: Unable to load script from assets ‘index.android.bundle’. Make sure your bundle is packaged correctly or you’re running a packager server. at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method) at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:216) at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:32) at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:243) at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1114) at com.facebook.react.ReactInstanceManager.access$900(ReactInstanceManager.java:116) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:913) at java.lang.Thread.run(Thread.java:764) 2018-10-31 14:07:50.434 22780-22780/com.dyna.mattermosta E/unknown:ReactNative: Unable to launch redbox because react activity is not available, here is the error that redbox would’ve displayed: Unable to load script from assets ‘index.android.bundle’. Make sure your bundle is packaged correctly or you’re running a packager server.

At another test

10-29 14:01:33.694 18148 18148 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbp; 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source:2) 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:6578) 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:6133) 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6043) 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at android.app.ActivityThread.-wrap1(Unknown Source:0) 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764) 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105) 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164) 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6944) 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) 10-29 14:01:33.694 18148 18148 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

I’m using node v10.11.0 and npm 6.4.1 and is working fine for me.

cd mattermost-mobile
make clean
source ~/mattermost-mobile-env-vars
make build-android

my mattermost-mobile-env-vars file for building android only

export LC_ALL="en_US.UTF-8"
export NODE_OPTIONS=--max_old_space_size=12000

############ MATTERMOST BUILD ############
export COMMIT_CHANGES_TO_GIT=true
export BRANCH_TO_BUILD=master
export GIT_LOCAL_BRANCH=build
export RESET_GIT_BRANCH=true

export APP_NAME=Mattermost
#export VERSION_NUMBER=1.13.0
#export BUILD_NUMBER=144
export BETA_BUILD=false
export BUILD_FOR_RELEASE=true
export REPLACE_ASSETS=true

export MAIN_APP_IDENTIFIER=com.mattermost.rn
export EXTENSION_APP_IDENTIFIER=com.mattermost.rn.MattermostShare