Closed sedrubal closed 1 year ago
:)
We would have fixed it already, but we are not familiar with NPM and whatnot.
Latest log always here: https://f-droid.org/wiki/page/com.mattermost.rnbeta/lastbuild
tar write after end
can be caused by an outdated NPM version. (Our VM has 5.8.0, which is quite old.)
@jasonblais What version of NPM/Yarn do you recommend?
@Rudloff Looks like NPM v6.4.1 is currently recommended: https://developers.mattermost.com/contribute/mobile/developer-setup/#install-nodejshttpsnodejsorgen
At FOSDEM, I've discussed some issues with a team member of Mattermost. On F-Droid, there is the classic app. Is that suppose to get phased out or should it be removed from F-Droid store? Or should it be kept for legacy reasons?
The launcher icon of the newer app has written BETA over it. Is that still the case should/can a non-BETA be packaged? See also https://search.f-droid.org/?q=mattermost
Here is an attempt to build 1.28.0 with NPM 6.4.1: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/6483
Thanks Rudloff! @licaon-kter let us know if it works with build 1.28.0?
At FOSDEM, I've discussed some issues with a team member of Mattermost. On F-Droid, there is the classic app. Is that suppose to get phased out or should it be removed from F-Droid store? Or should it be kept for legacy reasons?
The launcher icon of the newer app has written BETA over it. Is that still the case should/can a non-BETA be packaged? See also https://search.f-droid.org/?q=mattermost
Wondering if @Rudloff you would know?
@PanderMusubi For context, Mattermost doesn't maintain the F-Droid apps, they are community-maintained
I think we should keep Mattermost Classic on F-Droid until we can build recent versions of the react native app.
As for the app name, see my answer here: https://github.com/mattermost/mattermost-mobile/issues/566#issuecomment-500995302
It build, thanks. 👍
Published too, but can't actually login. 5.21.0 says:
{"level":"error","ts":1584487725.8919883,"caller":"mlog/log.go:175","msg":"Password field must not be blank","path":"/api/v4/users/login","request_id":"345x6emjdfyn78gssxmxph8ery","ip_addr":"MY.IP.WAS.HERE","user_id":"","method":"POST","err_where":"AuthenticateUserForLogin","http_code":400,"err_details":""}
Nothing in logcat
@licaon-kter how are you building it? Are the npm patches being applied?
Tested it, see 3 regression issues
1.30.0 builds fine, expect it next cycle, but I still can't login :( :(
1.32.0 fails with:
DEBUG: buildserver > ERROR: Could not build app com.mattermost.rnbeta: Build failed for com.mattermost.rnbeta:1.32.0
DEBUG: buildserver > ==== detail begin ====
DEBUG: buildserver > Found 6.0.1 via distributionUrl
DEBUG: buildserver > Running /opt/gradle/versions/6.0.1/bin/gradle assembleRelease
DEBUG: buildserver > To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/6.0.1/userguide/gradle_daemon.html.
DEBUG: buildserver > Daemon will be stopped at the end of the build stopping after processing
DEBUG: buildserver >
DEBUG: buildserver > > Configure project :app
DEBUG: buildserver > registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
DEBUG: buildserver > registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
DEBUG: buildserver > registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
DEBUG: buildserver >
DEBUG: buildserver > FAILURE: Build failed with an exception.
DEBUG: buildserver >
DEBUG: buildserver > * Where:
DEBUG: buildserver > Build file '/home/vagrant/build/com.mattermost.rnbeta/android/build.gradle' line: 32
DEBUG: buildserver >
DEBUG: buildserver > * What went wrong:
DEBUG: buildserver > A problem occurred configuring project ':react-native-community_masked-view'.
DEBUG: buildserver > > Could not find method android() for arguments [build_aqbqne0rqdsb67qp8xs6qs1av$_run_closure1$_closure3$_closure4@c6825c9] on project ':react-native-community_masked-view' of type org.gradle.api.Project.
@licaon-kter This might be caused by our scanner removing some build.gradle file in node_modules/@react-native-community/masked-view/
(probably because it contains a non-free dependency).
@Rudloff I'm looking into it, yes, build takes a while to get to that point of failing...
Ok, got this far:
DEBUG: buildserver > BUILD FAILED in 56s
DEBUG: buildserver > ERROR: Could not build app com.mattermost.rnbeta: Build failed for com.mattermost.rnbeta:1.32.0
DEBUG: buildserver > ==== detail begin ====
DEBUG: buildserver > Found 6.0.1 via distributionUrl
DEBUG: buildserver > Running /opt/gradle/versions/6.0.1/bin/gradle assembleRelease
DEBUG: buildserver > To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/6.0.1/userguide/gradle_daemon.html.
DEBUG: buildserver > Daemon will be stopped at the end of the build stopping after processing
DEBUG: buildserver >
DEBUG: buildserver > > Configure project :app
DEBUG: buildserver > registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
DEBUG: buildserver > registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
DEBUG: buildserver > registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
DEBUG: buildserver >
DEBUG: buildserver > > Configure project :react-native-local-auth
DEBUG: buildserver > WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
DEBUG: buildserver > It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
DEBUG: buildserver >
DEBUG: buildserver > FAILURE: Build failed with an exception.
DEBUG: buildserver >
DEBUG: buildserver > * What went wrong:
DEBUG: buildserver > Could not determine the dependencies of task ':app:lintVitalRelease'.
DEBUG: buildserver > > Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
DEBUG: buildserver > > Could not find react-native-0.62.2.jar (com.facebook.react:react-native:0.62.2).
DEBUG: buildserver > Searched in the following locations:
DEBUG: buildserver > file:/home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-v8/dist/com/facebook/react/react-native/0.62.2/react-native-0.62.2.jar
DEBUG: buildserver > > Could not find v8-android-8.80.1.jar (org.chromium:v8-android:8.80.1).
DEBUG: buildserver > Searched in the following locations:
DEBUG: buildserver > file:/home/vagrant/build/com.mattermost.rnbeta/node_modules/v8-android/dist/org/chromium/v8-android/8.80.1/v8-android-8.80.1.jar
DEBUG: buildserver >
Now what?
This metadata:
- versionName: 1.32.0
versionCode: 302
commit: v1.32.0
subdir: android/app/
sudo:
- sysctl fs.inotify.max_user_watches=524288
- sysctl -p
- apt-get update || apt-get update
- apt-get install -y --no-install-recommends -t stretch-backports npm
- npm -g install npm@6.4.1
init:
- sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
../../app/components/post_body_additional_content/post_body_additional_content.js
- rm ../../patches/react-native-youtube*
- make -C ../.. pre-run
gradle:
- yes
rm:
- node_modules/react-native-notifications/android/app/src/main/java/com/wix/reactnativenotifications/fcm/
- node_modules/xdate/build/compiler.jar
- node_modules/socketcluster/
- node_modules/shaka-player/third_party/closure/compiler.jar
- node_modules/.bin/socketcluster
- node_modules/react-native/template/
- node_modules/jetifier/lib/
prebuild:
- "sed -i -e '/play-services-gcm/,+2d' -e 's/bundleCommand: \"ram-bundle\",/bundleCommand:\
\ \"ram-bundle\", nodeExecutableAndArgs: [\"node\", \"--max-old-space-size=12000\"\
],/' build.gradle"
- sed -i -e '/YouTubeStandaloneModule/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
- sed -i -e '/com.google.android.gms.iid.InstanceID.getInstance/d' ../../node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
- sed -i -e '/play-services/d' ../../node_modules/react-native-device-info/android/build.gradle
- sed -i -e '/firebase/d' ../../node_modules/react-native-notifications/android/app/build.gradle
build.gradle
- sed -i -e '/hasPermission/d' -e '/tokenFetchIntent/d' -e '/FcmInstance/d'
-e '/FirebaseApp/'d ../../node_modules/react-native-notifications/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
../../node_modules/react-native-notifications/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
- sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
- echo truncate -s 0 ../../node_modules/react-native/node_modules/@react-native-community/cli/build/commands/server/external/xsel
scanignore:
- android/build.gradle
- node_modules/react-native-svg/android/build.gradle
- node_modules/react-native-image-picker/android/build.gradle
- node_modules/react-native-webview/android/build.gradle
- node_modules/react-native-permissions/android/build.gradle
- node_modules/react-native-screens/android/build.gradle
- node_modules/react-native-device-info/android/build.gradle
- node_modules/@react-native-community/async-storage/android/build.gradle
- node_modules/@react-native-community/netinfo/android/build.gradle
- node_modules/react-native-notifications/android/build.gradle
- node_modules/react-native-navigation/lib/android/build.gradle
- node_modules/@rudderstack/rudder-sdk-react-native/Example/android/build.gradle
- node_modules/react-native-localize/android/build.gradle
- node_modules/react-native-reanimated/android/build.gradle
- node_modules/@react-native-community/cookies/android/build.gradle
- node_modules/@react-native-community/masked-view/android/build.gradle
- node_modules/react-native-safe-area-context/android/build.gradle
- node_modules/@rudderstack/rudder-sdk-react-native/android/build.gradle
scandelete:
- node_modules
FYI I've added more scanignores (last 5-6), those files were cleaned by fdroid by removing the local maven repo references, aaaand the error above says that those jar could not be found...locally? Coincidence? I think not... :)
Blindly scanignore-ing random build.gradle files doesn't feel like progress :( https://gitlab.com/fdroid/fdroiddata/-/merge_requests/7037
Taking it for another spin. Updated recipe:
- versionName: 1.37.0
versionCode: 334
commit: v1.37.0
subdir: android/app/
sudo:
- sysctl fs.inotify.max_user_watches=524288
- sysctl -p
- apt-get update || apt-get update
- apt-get install -y --no-install-recommends -t stretch-backports npm
- npm -g install npm@6.4.1
init:
- npm install
gradle:
- yes
rm:
- rm ../../patches/react-native-youtube*
- node_modules/xdate/build/compiler.jar
- node_modules/socketcluster/
- node_modules/shaka-player/third_party/closure/compiler.jar
- node_modules/.bin/socketcluster
- node_modules/react-native/template/
- node_modules/jetifier/lib/
prebuild:
- sed -i -e 's/\#\!\/bin\/sh/\#\!\/usr\/bin\/env bash/' ../../scripts/*.sh
- sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
../../app/components/post_body_additional_content/post_body_additional_content.js
- "sed -i -e '/play-services-gcm/,+2d' -e 's/bundleCommand: \"ram-bundle\",/bundleCommand:\
\ \"ram-bundle\", nodeExecutableAndArgs: [\"node\", \"--max-old-space-size=12000\"\
],/' build.gradle"
- sed -i -e '66,71d' ../build.gradle
- sed -i -e '/bintray/d' ../../node_modules/@rudderstack/rudder-sdk-react-native/android/build.gradle
- sed -i -e '/YouTubeStandaloneModule/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
- sed -i -e '/com.google.android.gms.iid.InstanceID.getInstance/d' ../../node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
- sed -i -e '/play-services/d' ../../node_modules/react-native-device-info/android/build.gradle
- sed -i -e '/firebase/d' -e '/detox/d' ../../node_modules/react-native-notifications/android/app/build.gradle
build.gradle
- sed -i -e '/hasPermission/d' -e '/tokenFetchIntent/d' -e '/FcmInstance/d'
-e '/FirebaseApp/'d ../../node_modules/react-native-notifications/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
../../node_modules/react-native-notifications/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
- sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
scanignore:
- android/build.gradle
- node_modules/react-native/android
- node_modules/hermes-engine
- node_modules/jsc-android
- node_modules/@react-native-community/async-storage/android/build.gradle
- node_modules/@react-native-community/masked-view/android/build.gradle
- node_modules/@react-native-community/netinfo/android/build.gradle
- node_modules/react-native-device-info/android/build.gradle
- node_modules/react-native-image-picker/android/build.gradle
- node_modules/react-native-keychain/android/build.gradle
- node_modules/react-native-localize/android/build.gradle
- node_modules/react-native-navigation/lib/android/build.gradle
- node_modules/react-native-notifications/android/build.gradle
- node_modules/react-native-permissions/android/build.gradle
- node_modules/react-native-reanimated/android/build.gradle
- node_modules/react-native-safe-area-context/android/build.gradle
- node_modules/react-native-screens/android/build.gradle
- node_modules/react-native-svg/android/build.gradle
- node_modules/react-native-vector-icons/android/build.gradle
- node_modules/react-native-webview/android/build.gradle
scandelete:
- node_modules
...but an odd fail:
020-11-30 19:32:21,598 DEBUG: buildserver > > Task :react-native-webview:javaPreCompileRelease
2020-11-30 19:32:21,898 DEBUG: buildserver >
2020-11-30 19:32:21,898 DEBUG: buildserver > > Task :react-native-webview:compileReleaseJavaWithJavac FAILED
2020-11-30 19:32:21,899 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:14: error: package android.support.annotation does not exist
2020-11-30 19:32:21,899 DEBUG: buildserver > import android.support.annotation.RequiresApi;
2020-11-30 19:32:21,899 DEBUG: buildserver > ^
2020-11-30 19:32:21,899 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:15: error: package android.support.v4.content does not exist
2020-11-30 19:32:21,900 DEBUG: buildserver > import android.support.v4.content.ContextCompat;
2020-11-30 19:32:21,900 DEBUG: buildserver > ^
2020-11-30 19:32:21,900 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:16: error: package android.support.v4.content does not exist
2020-11-30 19:32:21,900 DEBUG: buildserver > import android.support.v4.content.FileProvider;
2020-11-30 19:32:21,901 DEBUG: buildserver > ^
2020-11-30 19:32:21,901 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewFileProvider.java:3: error: package android.support.v4.content does not exist
2020-11-30 19:32:21,901 DEBUG: buildserver > import android.support.v4.content.FileProvider;
2020-11-30 19:32:21,901 DEBUG: buildserver > ^
2020-11-30 19:32:21,902 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewFileProvider.java:10: error: cannot find symbol
2020-11-30 19:32:21,902 DEBUG: buildserver > public class RNCWebViewFileProvider extends FileProvider {
2020-11-30 19:32:21,902 DEBUG: buildserver > ^
2020-11-30 19:32:21,902 DEBUG: buildserver > symbol: class FileProvider
2020-11-30 19:32:21,902 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:178: error: cannot find symbol
2020-11-30 19:32:21,903 DEBUG: buildserver > @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
2020-11-30 19:32:21,903 DEBUG: buildserver > ^
2020-11-30 19:32:21,903 DEBUG: buildserver > symbol: class RequiresApi
2020-11-30 19:32:21,903 DEBUG: buildserver > location: class RNCWebViewModule
2020-11-30 19:32:21,903 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:224: error: cannot find symbol
2020-11-30 19:32:21,904 DEBUG: buildserver > if (ContextCompat.checkSelfPermission(getCurrentActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
2020-11-30 19:32:21,904 DEBUG: buildserver > ^
2020-11-30 19:32:21,904 DEBUG: buildserver > symbol: variable ContextCompat
2020-11-30 19:32:21,904 DEBUG: buildserver > location: class RNCWebViewModule
2020-11-30 19:32:21,905 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:352: error: cannot find symbol
2020-11-30 19:32:21,905 DEBUG: buildserver > return FileProvider.getUriForFile(getReactApplicationContext(), packageName + ".fileprovider", capturedFile);
2020-11-30 19:32:21,905 DEBUG: buildserver > ^
2020-11-30 19:32:21,905 DEBUG: buildserver > symbol: variable FileProvider
2020-11-30 19:32:21,905 DEBUG: buildserver > location: class RNCWebViewModule
2020-11-30 19:32:21,906 DEBUG: buildserver > Note: Some input files use or override a deprecated API.
2020-11-30 19:32:21,906 DEBUG: buildserver > Note: Recompile with -Xlint:deprecation for details.
2020-11-30 19:32:21,906 DEBUG: buildserver > Note: /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java uses unchecked or unsafe operations.
...any thoughts?
There's also this error that I don't understand
./scripts/postinstall.sh: 3: ./scripts/postinstall.sh: [[: not found
Failed to create destination dir dist/assets/
/home/vagrant/build/com.mattermost.rnbeta/scripts/generate-assets.js:22
throw e;
^
Error: ENOENT: no such file or directory, mkdir 'dist/assets/'
at Object.fs.mkdirSync (fs.js:885:18)
at leftMergeDirs (/home/vagrant/build/com.mattermost.rnbeta/scripts/generate-assets.js:17:12)
at Object.<anonymous> (/home/vagrant/build/com.mattermost.rnbeta/scripts/generate-assets.js:107:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
Generating app assets
...it tries to create dist/assets
but it fails? Where exactly should I create it then?
./scripts/postinstall.sh: 3: ./scripts/postinstall.sh: [[: not found
Sounds like you are not using bash to run this script. [[
is a bash-specific extension. It is strange though since the first line tells it to be executed by bash
.
Sounds like you are not using bash to run this script.
Why should it use bash? The scripts asks for sh
, right? FYI, in master it's fixed. ;)
Anyway, from the recipe: - sed -i -e 's/\#\!\/bin\/sh/\#\!\/usr\/bin\/env bash/' ../../scripts/*.sh
I tried to fix it but looks like I need to fix it in init:
before npm install
actually, maybe that's the magic for this fail anyway.
/LE: Nope, still the same fail /LE2: No use to create the folder manually as it gets removed first, right? /LE3: So let's bypass that, remove these 3 lines: https://github.com/mattermost/mattermost-mobile/blob/v1.37.0/scripts/generate-assets.js#L102-L104 now it works, well this fail is fixed. The main one above still is present.
Moving a bit forward/backward dunno
2020-12-01 11:56:58,076 DEBUG: buildserver > > Task :react-native-cookies:compileReleaseJavaWithJavac
2020-12-01 11:56:58,077 DEBUG: buildserver > Note: /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-cookies/android/src/main/java/com/psykar/cookiemanager/CookieManagerModule.java uses unchecked or unsafe operations.
2020-12-01 11:56:58,077 DEBUG: buildserver > Note: Recompile with -Xlint:unchecked for details.
2020-12-01 11:56:58,077 DEBUG: buildserver >
2020-12-01 11:56:58,077 DEBUG: buildserver > > Task :react-native-document-picker:parseReleaseLibraryResources
2020-12-01 11:56:58,078 DEBUG: buildserver > > Task :react-native-device-info:generateReleaseRFile
2020-12-01 11:56:58,378 DEBUG: buildserver >
2020-12-01 11:56:58,378 DEBUG: buildserver > > Task :react-native-device-info:compileReleaseJavaWithJavac FAILED
2020-12-01 11:56:58,379 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNInstallReferrerClient.java:8: error: package com.android.installreferrer.api does not exist
2020-12-01 11:56:58,379 DEBUG: buildserver > import com.android.installreferrer.api.InstallReferrerClient;
2020-12-01 11:56:58,379 DEBUG: buildserver > ^
2020-12-01 11:56:58,380 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNInstallReferrerClient.java:9: error: package com.android.installreferrer.api does not exist
2020-12-01 11:56:58,380 DEBUG: buildserver > import com.android.installreferrer.api.InstallReferrerStateListener;
2020-12-01 11:56:58,381 DEBUG: buildserver > ^
2020-12-01 11:56:58,381 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNInstallReferrerClient.java:10: error: package com.android.installreferrer.api does not exist
2020-12-01 11:56:58,381 DEBUG: buildserver > import com.android.installreferrer.api.ReferrerDetails;
2020-12-01 11:56:58,382 DEBUG: buildserver > ^
2020-12-01 11:56:58,382 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNInstallReferrerClient.java:15: error: cannot find symbol
2020-12-01 11:56:58,383 DEBUG: buildserver > private InstallReferrerClient mReferrerClient;
2020-12-01 11:56:58,383 DEBUG: buildserver > ^
2020-12-01 11:56:58,383 DEBUG: buildserver > symbol: class InstallReferrerClient
2020-12-01 11:56:58,384 DEBUG: buildserver > location: class RNInstallReferrerClient
2020-12-01 11:56:58,384 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNInstallReferrerClient.java:41: error: cannot find symbol
2020-12-01 11:56:58,384 DEBUG: buildserver > private InstallReferrerStateListener installReferrerStateListener =
2020-12-01 11:56:58,385 DEBUG: buildserver > ^
2020-12-01 11:56:58,385 DEBUG: buildserver > symbol: class InstallReferrerStateListener
2020-12-01 11:56:58,385 DEBUG: buildserver > location: class RNInstallReferrerClient
2020-12-01 11:56:58,386 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNInstallReferrerClient.java:19: error: cannot find symbol
2020-12-01 11:56:58,386 DEBUG: buildserver > mReferrerClient = InstallReferrerClient.newBuilder(context).build();
2020-12-01 11:56:58,387 DEBUG: buildserver > ^
2020-12-01 11:56:58,387 DEBUG: buildserver > symbol: variable InstallReferrerClient
2020-12-01 11:56:58,387 DEBUG: buildserver > location: class RNInstallReferrerClient
2020-12-01 11:56:58,388 DEBUG: buildserver > /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNInstallReferrerClient.java:42: error: cannot find symbol
2020-12-01 11:56:58,388 DEBUG: buildserver > new InstallReferrerStateListener() {
2020-12-01 11:56:58,388 DEBUG: buildserver > ^
2020-12-01 11:56:58,389 DEBUG: buildserver > symbol: class InstallReferrerStateListener
2020-12-01 11:56:58,389 DEBUG: buildserver > location: class RNInstallReferrerClient
2020-12-01 11:56:58,389 DEBUG: buildserver > Note: /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java uses or overrides a deprecated API.
2020-12-01 11:56:58,390 DEBUG: buildserver > Note: Recompile with -Xlint:deprecation for details.
2020-12-01 11:56:58,390 DEBUG: buildserver > 7 errors
2020-12-01 11:56:58,390 DEBUG: buildserver >
2020-12-01 11:56:58,390 DEBUG: buildserver > > Task :react-native-document-picker:javaPreCompileRelease
2020-12-01 11:56:58,391 DEBUG: buildserver > > Task :react-native-cookies:bundleLibCompileRelease
2020-12-01 11:56:58,391 DEBUG: buildserver > > Task :react-native-document-picker:processReleaseManifest
...in theory I could add some placeholders for these...from yaxim or Conversations maybe
Looking at 1.38.0 since that will be released soon, updated recipe, still failling for InstallReferrer:
- versionName: 1.38.0
versionCode: 337
commit: 25d5b48db176d1aa68a4a97837c6e5f3642f4a63
subdir: android/app/
sudo:
- sysctl fs.inotify.max_user_watches=524288
- sysctl -p
- apt-get update || apt-get update
- apt-get install -y --no-install-recommends -t stretch-backports npm
- npm -g install npm@6.4.1
init:
- sed -i -e "/fs.existsSync('dist')/,+2d" ../../scripts/generate-assets.js
- pushd ../..
- mkdir -p dist/assets
- npm install
- popd
gradle:
- yes
rm:
- rm ../../patches/react-native-youtube*
- node_modules/xdate/build/compiler.jar
- node_modules/socketcluster/
- node_modules/shaka-player/third_party/closure/compiler.jar
- node_modules/.bin/socketcluster
- node_modules/react-native/template/
- node_modules/jetifier/lib/
prebuild:
- sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
../../app/components/post_body_additional_content/post_body_additional_content.js
- "sed -i -e '/play-services-gcm/,+2d' -e 's/bundleCommand: \"ram-bundle\",/bundleCommand:\
\ \"ram-bundle\", nodeExecutableAndArgs: [\"node\", \"--max-old-space-size=12000\"\
],/' -e '/firebase/d' -e '/detox/d' build.gradle"
- sed -i -e '66,71d' ../build.gradle
- sed -i -e '/bintray/d' ../../node_modules/@rudderstack/rudder-sdk-react-native/android/build.gradle
- sed -i -e '/YouTubeStandaloneModule/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
- sed -i -e '/com.google.android.gms.iid.InstanceID.getInstance/d' ../../node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
- sed -i -e '/installreferrer/,+7d' ../../node_modules/react-native-device-info/android/build.gradle
build.gradle
- sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
- sed -i -e '/firebase-messaging/d' ../../node_modules/react-native-notifications/lib/android/app/build.gradle
- sed -i -e '/google-services/d' ../../node_modules/react-native-notifications/lib/android/build.gradle
scanignore:
- android/build.gradle
- node_modules/react-native/android
- node_modules/hermes-engine
- node_modules/jsc-android
- node_modules/@react-native-community/async-storage/android/build.gradle
- node_modules/@react-native-community/masked-view/android/build.gradle
- node_modules/@react-native-community/netinfo/android/build.gradle
- node_modules/react-native-device-info/android/build.gradle
- node_modules/react-native-image-picker/android/build.gradle
- node_modules/react-native-keychain/android/build.gradle
- node_modules/react-native-localize/android/build.gradle
- node_modules/react-native-navigation/lib/android/build.gradle
- node_modules/react-native-notifications/lib/android/build.gradle
- node_modules/react-native-permissions/android/build.gradle
- node_modules/react-native-reanimated/android/build.gradle
- node_modules/react-native-safe-area-context/android/build.gradle
- node_modules/react-native-screens/android/build.gradle
- node_modules/react-native-share/android/build.gradle
- node_modules/react-native-svg/android/build.gradle
- node_modules/react-native-vector-icons/android/build.gradle
- node_modules/react-native-webview/android/build.gradle
scandelete:
- node_modules
Ok, react-native-device-info 8.0.0 no longer needs GMS and InstallReferrer thanks to Jitsi Meet devs.
So, updated recipe:
- versionName: 1.39.0
versionCode: 340
commit: f64a7dc3ad496c151c04695ca8798200ccc94689
subdir: android/app/
sudo:
- sysctl fs.inotify.max_user_watches=524288
- sysctl -p
- apt-get update || apt-get update
- apt-get install -y --no-install-recommends -t stretch-backports npm
- npm -g install npm@6.4.1
init:
- echo sed -i -e 's/\#\!\/bin\/sh/\#\!\/usr\/bin\/env bash/' ../../scripts/*.sh
- sed -i -e "/fs.existsSync('dist')/,+2d" ../../scripts/generate-assets.js
- pushd ../..
- mkdir -p dist/assets
- npm install
- popd
patch:
- device-info-non-foss.patch
gradle:
- yes
rm:
- rm ../../patches/react-native-youtube*
- node_modules/xdate/build/compiler.jar
- node_modules/socketcluster/
- node_modules/shaka-player/third_party/closure/compiler.jar
- node_modules/.bin/socketcluster
- node_modules/react-native/template/
- node_modules/jetifier/lib/
prebuild:
- sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
../../app/components/post_body_additional_content/post_body_additional_content.js
- "sed -i -e '/play-services-gcm/,+2d' -e 's/bundleCommand: \"ram-bundle\",/bundleCommand:\
\ \"ram-bundle\", nodeExecutableAndArgs: [\"node\", \"--max-old-space-size=12000\"\
],/' -e '/firebase/d' -e '/detox/d' build.gradle"
- sed -i -e '66,71d' ../build.gradle
- sed -i -e '/bintray/d' ../../node_modules/@rudderstack/rudder-sdk-react-native/android/build.gradle
- sed -i -e '/YouTubeStandaloneModule/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
- sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
- sed -i -e '/firebase-messaging/d' ../../node_modules/react-native-notifications/lib/android/app/build.gradle
- sed -i -e '/google-services/d' ../../node_modules/react-native-notifications/lib/android/build.gradle
- sed -E -i '/installreferrer/,+11d' ../../node_modules/react-native-device-info/android/build.gradle
scanignore:
- android/build.gradle
- node_modules/react-native/android
- node_modules/hermes-engine
- node_modules/jsc-android
- node_modules/@react-native-community/async-storage/android/build.gradle
- node_modules/@react-native-community/masked-view/android/build.gradle
- node_modules/@react-native-community/netinfo/android/build.gradle
- node_modules/react-native-device-info/android/build.gradle
- node_modules/react-native-image-picker/android/build.gradle
- node_modules/react-native-localize/android/build.gradle
- node_modules/react-native-navigation/lib/android/build.gradle
- node_modules/react-native-notifications/lib/android/build.gradle
- node_modules/react-native-permissions/android/build.gradle
- node_modules/react-native-reanimated/android/build.gradle
- node_modules/react-native-safe-area-context/android/build.gradle
- node_modules/react-native-screens/android/build.gradle
- node_modules/react-native-share/android/build.gradle
- node_modules/react-native-svg/android/build.gradle
- node_modules/react-native-vector-icons/android/build.gradle
- node_modules/react-native-webview/android/build.gradle
scandelete:
- node_modules
Patch contents:
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -259,6 +259,12 @@
implementation 'com.facebook.fresco:animated-webp:2.0.0'
implementation 'com.facebook.fresco:webpsupport:2.0.0'
+ implementation(project(':react-native-device-info')) {
+ exclude group: 'com.google.firebase'
+ exclude group: 'com.google.android.gms'
+ exclude group: 'com.android.installreferrer'
+ }
+
androidTestImplementation('com.wix:detox:+')
}
But now an odd fail:
...
> Task :react-native-video:bundleLibCompileRelease
> Task :react-native-webview:checkReleaseManifest
> Task :react-native-webview:compileReleaseRenderscript NO-SOURCE
> Task :react-native-webview:generateReleaseBuildConfig
> Task :react-native-webview:generateReleaseResValues
> Task :react-native-webview:generateReleaseResources
> Task :react-native-webview:packageReleaseResources
> Task :reactnativenotifications:checkReactNative60ReleaseManifest
> Task :reactnativenotifications:compileReactNative60ReleaseRenderscript NO-SOURCE
> Task :reactnativenotifications:generateReactNative60ReleaseBuildConfig
> Task :react-native-webview:parseReleaseLibraryResources
> Task :reactnativenotifications:generateReactNative60ReleaseResValues
> Task :reactnativenotifications:generateReactNative60ReleaseResources
> Task :reactnativenotifications:packageReactNative60ReleaseResources
> Task :reactnativenotifications:parseReactNative60ReleaseLibraryResources
> Task :react-native-webview:processReleaseManifest
> Task :reactnativenotifications:processReactNative60ReleaseManifest
> Task :rn-fetch-blob:compileReleaseRenderscript NO-SOURCE
> Task :rn-fetch-blob:checkReleaseManifest
> Task :rn-fetch-blob:generateReleaseBuildConfig
> Task :rn-fetch-blob:generateReleaseResValues
> Task :rn-fetch-blob:generateReleaseResources
> Task :rn-fetch-blob:packageReleaseResources
> Task :rn-fetch-blob:processReleaseManifest
> Task :react-native-webview:generateReleaseRFile
> Task :react-native-webview:compileReleaseKotlin
> Task :reactnativenotifications:generateReactNative60ReleaseRFile
> Task :rn-fetch-blob:javaPreCompileRelease
> Task :reactnativenotifications:compileReactNative60ReleaseKotlin
> Task :react-native-webview:javaPreCompileRelease
> Task :react-native-webview:compileReleaseJavaWithJavac FAILED
/home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:14: error: package android.support.annotation does not exist
import android.support.annotation.RequiresApi;
^
/home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:15: error: package android.support.v4.content does not exist
import android.support.v4.content.ContextCompat;
^
/home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:16: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
/home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewFileProvider.java:3: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
/home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewFileProvider.java:10: error: cannot find symbol
public class RNCWebViewFileProvider extends FileProvider {
^
symbol: class FileProvider
/home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:178: error: cannot find symbol
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
^
symbol: class RequiresApi
location: class RNCWebViewModule
/home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:224: error: cannot find symbol
if (ContextCompat.checkSelfPermission(getCurrentActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
^
symbol: variable ContextCompat
location: class RNCWebViewModule
/home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:352: error: cannot find symbol
return FileProvider.getUriForFile(getReactApplicationContext(), packageName + ".fileprovider", capturedFile);
^
symbol: variable FileProvider
location: class RNCWebViewModule
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
8 errors
> Task :rn-fetch-blob:parseReleaseLibraryResources
> Task :reactnativenotifications:javaPreCompileReactNative60Release
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-webview:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
What am I missing?
perhaps ask in react-native-webview (upstream) issue queue? this is an upstream module - thats failling to compile with those 3 exclude's patched-in, no? If those weren't patched in - does it then compile? (just shooting blanks here.. also really missing this app in mattermost)
patch as above + updated recipe a bit
- versionName: 1.44.1
versionCode: 360
commit: v1.44.1
subdir: android/app
sudo:
- sysctl fs.inotify.max_user_watches=524288
- sysctl -p
- apt-get update || apt-get update
- apt-get install -y --no-install-recommends -t stretch-backports npm
- npm -g install npm@6.4.1
init:
- sed -i -e "/fs.existsSync('dist')/,+2d" ../../scripts/generate-assets.js
- pushd ../..
- mkdir -p dist/assets
- npm install
- popd
patch:
- device-info-non-foss.patch
gradle:
- yes
rm:
- rm ../../patches/react-native-youtube*
- app/components/post_list/post/body/content/youtube/
- node_modules/xdate/build/compiler.jar
- node_modules/socketcluster/
- node_modules/shaka-player/third_party/closure/compiler.jar
- node_modules/.bin/socketcluster
- node_modules/react-native/template/
- node_modules/jetifier/lib/
prebuild:
- sed -i -e '/react-native-youtube/d' ../../package.json
- sed -i -e '/(isYoutubeLink(/,+8d' -e '/youtube/d' ../../app/components/post_list/post/body/content/index.tsx
- "sed -i -e 's/bundleCommand: \"ram-bundle\",/bundleCommand:\
\ \"ram-bundle\", nodeExecutableAndArgs: [\"node\", \"--max-old-space-size=12000\"\
],/' -e '/firebase/d' -e '/detox/d' build.gradle"
- sed -i -e '54,59d' ../build.gradle
- sed -i -e '/bintray/d' ../../node_modules/@rudderstack/rudder-sdk-react-native/android/build.gradle
- sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
- sed -i -e '/firebase-messaging/d' ../../node_modules/react-native-notifications/lib/android/app/build.gradle
- sed -i -e '/google-services/d' ../../node_modules/react-native-notifications/lib/android/build.gradle
- sed -E -i '/installreferrer/,+11d' ../../node_modules/react-native-device-info/android/build.gradle
scanignore:
- android/build.gradle
- node_modules/react-native/android
- node_modules/hermes-engine
- node_modules/jsc-android
- node_modules/@react-native-community/async-storage/android/build.gradle
- node_modules/@react-native-community/masked-view/android/build.gradle
- node_modules/@react-native-community/netinfo/android/build.gradle
- node_modules/react-native-device-info/android/build.gradle
- node_modules/react-native-image-picker/android/build.gradle
- node_modules/react-native-localize/android/build.gradle
- node_modules/react-native-navigation/lib/android/build.gradle
- node_modules/react-native-notifications/lib/android/build.gradle
- node_modules/react-native-permissions/android/build.gradle
- node_modules/react-native-reanimated/android/build.gradle
- node_modules/react-native-safe-area-context/android/build.gradle
- node_modules/react-native-screens/android/build.gradle
- node_modules/react-native-share/android/build.gradle
- node_modules/react-native-svg/android/build.gradle
- node_modules/react-native-vector-icons/android/build.gradle
- node_modules/react-native-webview/android/build.gradle
scandelete:
- node_modules
fails with
:ReactNative:Unexpected empty result of running '[node, -e, console.log(require('react-native/cli').bin);]' command.
:ReactNative:Running '[node, -e, console.log(require('react-native/cli').bin);]' command failed.
FAILURE: Build failed with an exception.
* Where:
Script '/home/vagrant/build/com.mattermost.rnbeta/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 205
* What went wrong:
A problem occurred evaluating script.
> /home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/doctor/healthchecks/index.js:48 } catch {} ^SyntaxError: Unexpected token { at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:616:28) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (/home/vagrant/build/com.mattermost.rnbeta/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/doctor/doctor.js:28:21)
Another recipe update (same patch), maybe now somebody can drop in some wisdom?
- versionName: 1.46.0
versionCode: 365
commit: ed1cc2a51da431d22d782cef5ad0c7e6a2981a7c
subdir: android/app
sudo:
- sysctl fs.inotify.max_user_watches=524288
- curl -Lo node.tar.xz https://nodejs.org/dist/v16.2.0/node-v16.2.0-linux-x64.tar.xz
- echo "e134c8738761ab908aac3b62efa4865d8a7c73e40cc7758c6e99244921696216 node.tar.xz" | sha256sum -c -
- tar xJf node.tar.xz
- cp -a node-v16.2.0-linux-x64/. /usr/local/
init:
- pushd ../..
- sed -i -e "/fs.existsSync('dist')/,+2d" scripts/generate-assets.js
- mkdir -p dist/assets
- popd
- npm install --ignore-scripts
- npx patch-package
patch:
- device-info-non-foss.patch
gradle:
- yes
rm:
- rm ../../patches/react-native-youtube*
- app/components/post_list/post/body/content/youtube/
- node_modules/xdate/build/compiler.jar
- node_modules/socketcluster/
- node_modules/shaka-player/third_party/closure/compiler.jar
- node_modules/.bin/socketcluster
- node_modules/react-native/template/
- node_modules/jetifier/lib/
prebuild:
- sed -i -e '/react-native-youtube/d' ../../package.json
- sed -i -e '/(isYoutubeLink(/,+8d' -e '/youtube/d' ../../app/components/post_list/post/body/content/index.tsx
- "sed -i -e 's/bundleCommand: \"ram-bundle\",/bundleCommand:\
\ \"ram-bundle\", nodeExecutableAndArgs: [\"node\", \"--max-old-space-size=12000\"\
],/' -e '/firebase/d' -e '/detox/d' build.gradle"
- sed -i -e '54,59d' ../build.gradle
- sed -i -e '/bintray/d' ../../node_modules/@rudderstack/rudder-sdk-react-native/android/build.gradle
- sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
- sed -i -e '/firebase-messaging/d' ../../node_modules/react-native-notifications/lib/android/app/build.gradle
- sed -i -e '/google-services/d' ../../node_modules/react-native-notifications/lib/android/build.gradle
- sed -E -i '/installreferrer/,+11d' ../../node_modules/react-native-device-info/android/build.gradle
build:
- pushd ../..
- node scripts/generate-assets.js
- ./node_modules/.bin/jetify
- popd
scanignore:
- android/build.gradle
- node_modules/react-native/android
- node_modules/hermes-engine
- node_modules/jsc-android
- node_modules/@react-native-community/async-storage/android/build.gradle
- node_modules/@react-native-community/masked-view/android/build.gradle
- node_modules/@react-native-community/netinfo/android/build.gradle
- node_modules/react-native-device-info/android/build.gradle
- node_modules/react-native-localize/android/build.gradle
- node_modules/react-native-navigation/lib/android/build.gradle
- node_modules/react-native-notifications/lib/android/build.gradle
- node_modules/react-native-permissions/android/build.gradle
- node_modules/react-native-safe-area-context/android/build.gradle
- node_modules/react-native-screens/android/build.gradle
- node_modules/react-native-share/android/build.gradle
- node_modules/react-native-svg/android/build.gradle
- node_modules/react-native-vector-icons/android/build.gradle
- node_modules/react-native-webview/android/build.gradle
scandelete:
- node_modules
Fails with:
2021-07-30 14:07:27,333 DEBUG: buildserver > > Configure project :app
2021-07-30 14:07:27,333 DEBUG: buildserver > WARNING: API 'BaseVariant.getApplicationIdTextResource' is obsolete and has been replaced with 'VariantProperties.applicationId'.
2021-07-30 14:07:27,333 DEBUG: buildserver > It will be removed in version 5.0 of the Android Gradle plugin.
2021-07-30 14:07:27,334 DEBUG: buildserver > For more information, see TBD.
2021-07-30 14:07:27,334 DEBUG: buildserver > To determine what is calling BaseVariant.getApplicationIdTextResource, use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
2021-07-30 14:07:27,334 DEBUG: buildserver > registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
2021-07-30 14:07:27,334 DEBUG: buildserver > registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
2021-07-30 14:07:27,335 DEBUG: buildserver > registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
2021-07-30 14:07:27,335 DEBUG: buildserver >
2021-07-30 14:07:27,335 DEBUG: buildserver > > Configure project :react-native-local-auth
2021-07-30 14:07:27,336 DEBUG: buildserver > WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
2021-07-30 14:07:27,336 DEBUG: buildserver > It will be removed in version 5.0 of the Android Gradle plugin.
2021-07-30 14:07:27,336 DEBUG: buildserver > For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.
2021-07-30 14:07:27,336 DEBUG: buildserver >
2021-07-30 14:07:27,337 DEBUG: buildserver > FAILURE: Build failed with an exception.
2021-07-30 14:07:27,337 DEBUG: buildserver >
2021-07-30 14:07:27,337 DEBUG: buildserver > * What went wrong:
2021-07-30 14:07:27,338 DEBUG: buildserver > Could not determine the dependencies of task ':app:lintVitalRelease'.
2021-07-30 14:07:27,338 DEBUG: buildserver > > Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
2021-07-30 14:07:27,338 DEBUG: buildserver > > Could not resolve project :react-native-cookies_cookies.
2021-07-30 14:07:27,339 DEBUG: buildserver > Required by:
2021-07-30 14:07:27,339 DEBUG: buildserver > project :app
2021-07-30 14:07:27,339 DEBUG: buildserver > > No matching configuration of project :react-native-cookies_cookies was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'RNNotifications.reactNativeVersion' with value 'reactNative60' but:
2021-07-30 14:07:27,339 DEBUG: buildserver > - None of the consumable configurations have attributes.
2021-07-30 14:07:27,340 DEBUG: buildserver > > Could not resolve project :react-native-mmkv-storage.
2021-07-30 14:07:27,340 DEBUG: buildserver > Required by:
2021-07-30 14:07:27,341 DEBUG: buildserver > project :app
2021-07-30 14:07:27,341 DEBUG: buildserver > > No matching configuration of project :react-native-mmkv-storage was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'RNNotifications.reactNativeVersion' with value 'reactNative60' but:
2021-07-30 14:07:27,341 DEBUG: buildserver > - None of the consumable configurations have attributes.
Nothing new, I just noticed that patch-package failed, wrong path, so I fixed that:
- versionName: 1.46.0
versionCode: 368
commit: e6dbd5fbdc12539ccb8129b5bd3122ee35ce12af
subdir: android/app
sudo:
- sysctl fs.inotify.max_user_watches=524288
- curl -Lo node.tar.xz https://nodejs.org/dist/v16.2.0/node-v16.2.0-linux-x64.tar.xz
- echo "e134c8738761ab908aac3b62efa4865d8a7c73e40cc7758c6e99244921696216 node.tar.xz" | sha256sum -c -
- tar xJf node.tar.xz
- cp -a node-v16.2.0-linux-x64/. /usr/local/
init:
- pushd ../..
- sed -i -e "/fs.existsSync('dist')/,+2d" scripts/generate-assets.js
- mkdir -p dist/assets
- popd
- npm install --ignore-scripts
patch:
- device-info-non-foss.patch
gradle:
- yes
rm:
- rm ../../patches/react-native-youtube*
- app/components/post_list/post/body/content/youtube/
- node_modules/xdate/build/compiler.jar
- node_modules/socketcluster/
- node_modules/shaka-player/third_party/closure/compiler.jar
- node_modules/.bin/socketcluster
- node_modules/react-native/template/
- node_modules/jetifier/lib/
prebuild:
- pushd ../..
- npx patch-package --error-on-fail
- sed -i -e '/react-native-youtube/d' package.json
- sed -i -e '/(isYoutubeLink(/,+8d' -e '/youtube/d' app/components/post_list/post/body/content/index.tsx
- sed -i -e '/bintray/d' node_modules/@rudderstack/rudder-sdk-react-native/android/build.gradle
- sed -i -e '/maven {/,+2d' node_modules/react-native-document-picker/android/build.gradle
- sed -i -e '/firebase-messaging/d' node_modules/react-native-notifications/lib/android/app/build.gradle
- sed -i -e '/google-services/d' node_modules/react-native-notifications/lib/android/build.gradle
- sed -E -i '/installreferrer/,+11d' node_modules/react-native-device-info/android/build.gradle
- popd
- sed -i -e '54,59d' ../build.gradle
- "sed -i -e 's/bundleCommand: \"ram-bundle\",/bundleCommand:\
\ \"ram-bundle\", nodeExecutableAndArgs: [\"node\", \"--max-old-space-size=12000\"\
],/' -e '/firebase/d' -e '/detox/d' build.gradle"
build:
- pushd ../..
- node scripts/generate-assets.js
- ./node_modules/.bin/jetify
- popd
scanignore:
- android/build.gradle
- node_modules/react-native/android
- node_modules/hermes-engine
- node_modules/jsc-android
- node_modules/@react-native-community/async-storage/android/build.gradle
- node_modules/@react-native-community/masked-view/android/build.gradle
- node_modules/@react-native-community/netinfo/android/build.gradle
- node_modules/react-native-device-info/android/build.gradle
- node_modules/react-native-localize/android/build.gradle
- node_modules/react-native-navigation/lib/android/build.gradle
- node_modules/react-native-notifications/lib/android/build.gradle
- node_modules/react-native-permissions/android/build.gradle
- node_modules/react-native-safe-area-context/android/build.gradle
- node_modules/react-native-screens/android/build.gradle
- node_modules/react-native-share/android/build.gradle
- node_modules/react-native-svg/android/build.gradle
- node_modules/react-native-vector-icons/android/build.gradle
- node_modules/react-native-webview/android/build.gradle
scandelete:
- node_modules
...same error as above
Trying to run again, a fresh bug elsewhere fyi https://github.com/software-mansion/react-native-reanimated/issues/2936 pfft
Some progress, updated recipe:
- versionName: 1.49.0
versionCode: 383
commit: 169402329938f572536cb63a8c4ce03642a0040a
subdir: android/app
sudo:
- sysctl fs.inotify.max_user_watches=524288
- curl -Lo node.tar.xz https://nodejs.org/dist/v16.2.0/node-v16.2.0-linux-x64.tar.xz
- echo "e134c8738761ab908aac3b62efa4865d8a7c73e40cc7758c6e99244921696216 node.tar.xz"
| sha256sum -c -
- tar xJf node.tar.xz
- cp -a node-v16.2.0-linux-x64/. /usr/local/
- npm i -g npm@latest
- npm -g install yarn
init:
- pushd ../..
- sed -i -e "/fs.existsSync('dist')/,+2d" scripts/generate-assets.js
- mkdir -p dist/assets
- sed -i -e 's:d2p3iGoWbBpmYrZJnGOGoxfSeLTtwQKBQB+LeDA91RAc2RUCiMAA5kYGneSD0uK3L/TgEu6BuObQiCS2GoFMwA==:80k8ic7XSrvwlin2D5dtpNth4rl+zrabqfDhEJ0fZS3D5J9CvFGb7Sj7U2z6j9F2D9/FXhXV2uxi++HHsQWvYQ==:g'
package-lock.json
- popd
- npm install --ignore-scripts
patch:
- device-info-non-foss.patch
gradle:
- yes
srclibs:
- react-native-reanimated@2.3.1
rm:
- rm ../../patches/react-native-youtube*
- app/components/post_list/post/body/content/youtube/
- node_modules/xdate/build/compiler.jar
- node_modules/socketcluster/
- node_modules/shaka-player/third_party/closure/compiler.jar
- node_modules/.bin/socketcluster
- node_modules/react-native/template/
- node_modules/jetifier/lib/
prebuild:
- pushd ../..
- npx patch-package --error-on-fail
- sed -i -e '/react-native-youtube/d' package.json
- sed -i -e '/(isYoutubeLink(/,+8d' -e '/youtube/d' app/components/post_list/post/body/content/index.tsx
- sed -i -e '/bintray/d' node_modules/@rudderstack/rudder-sdk-react-native/android/build.gradle
- sed -i -e '/maven {/,+3d' node_modules/react-native-document-picker/android/build.gradle
- sed -i -e '/firebase-messaging/d' node_modules/react-native-notifications/lib/android/app/build.gradle
- sed -i -e '/google-services/d' node_modules/react-native-notifications/lib/android/build.gradle
- sed -E -i '/installreferrer/,+11d' node_modules/react-native-device-info/android/build.gradle
- sed -i '95,106d' node_modules/react-native-reanimated/android/build.gradle
- popd
- sed -i -e '51,57d' ../build.gradle
- "sed -i -e 's/bundleCommand: \"ram-bundle\",/bundleCommand: \"ram-bundle\"\
, nodeExecutableAndArgs: [\"node\", \"--max-old-space-size=12000\"],/' -e\
\ '/firebase/d' -e '/detox/d' -e '/splits {/,+7d' -e '/applicationVariants/,+12d'\
\ build.gradle"
- cd $$react-native-reanimated$$
- sed -i '95,106d' ../android-npm/build.gradle
- yarn install
scanignore:
- android/build.gradle
- node_modules/hermes-engine
- node_modules/jsc-android
- node_modules/react-native/android
- node_modules/@react-native-community/masked-view/android/build.gradle
- node_modules/@react-native-community/netinfo/android/build.gradle
- node_modules/react-native-device-info/android/build.gradle
- node_modules/react-native-localize/android/build.gradle
- node_modules/react-native-navigation/lib/android/build.gradle
- node_modules/react-native-notifications/lib/android/build.gradle
- node_modules/react-native-permissions/android/build.gradle
- node_modules/react-native-safe-area-context/android/build.gradle
- node_modules/react-native-screens/android/build.gradle
- node_modules/react-native-share/android/build.gradle
- node_modules/react-native-svg/android/build.gradle
- node_modules/react-native-vector-icons/android/build.gradle
- node_modules/react-native-webview/android/build.gradle
- node_modules/detox/android/build.gradle
- node_modules/detox/android/detox/publishing.gradle
- node_modules/@mattermost/react-native-paste-input/android/build.gradle
- node_modules/@react-native-async-storage/async-storage/android/build.gradle
- node_modules/@react-native-cookies/cookies/android/build.gradle
- node_modules/react-native-fast-image/android/build.gradle
- node_modules/react-native-mmkv-storage/android/build.gradle
- node_modules/react-native/ReactAndroid/build.gradle
scandelete:
- node_modules
build:
- pushd ../..
- node scripts/generate-assets.js
- ./node_modules/.bin/jetify
- popd
- pushd $$react-native-reanimated$$
- FOR_HERMES=True gradle :assembleRelease
- popd
- mv $$react-native-reanimated$$/build/outputs/aar/android-release.aar ../../node_modules/react-native-reanimated/android/react-native-reanimated-66-hermes.aar
- pushd $$react-native-reanimated$$
- gradle :assembleRelease
- popd
- mv $$react-native-reanimated$$/build/outputs/aar/android-release.aar ../../node_modules/react-native-reanimated/android/react-native-reanimated-66-jsc.aar
ndk: r21e
...which fails later when webrtc can't be found
@streamer45 How does one build your fork of react-native-webrtc
from FOSS dependencies? I tried to add implementation 'org.webrtc:google-webrtc:1.0.32006'
so it's picked up from maven and not use "random binaries dropped in libs/" but it appears to have a lot of missing sections in build.gradle ( I've added some more stuff so at least it runs https://gist.github.com/licaon-kter/386f4f0a8f4f33d24fbd4342f3fd3544 ). It errors out and complains about androidx, annotations and whatnot ( https://gist.github.com/licaon-kter/2d53e66904fc693cc208d4287bce74e2 )
@licaon-kter I am not sure I ever tried, honestly I am still very new to mobile development so probably not the best person to help here. I am wondering if you are able to compile the original project (https://github.com/react-native-webrtc/react-native-webrtc). If so we may look into what's happening with the fork itself.
@streamer45 Is that really upstream? Looking in https://github.com/mattermost/mattermost-mobile/blob/v1.48.0/package.json#L80 I guess it's https://github.com/juncocoa/react-native-webrtc2 ?
Looking at https://github.com/streamer45/react-native-webrtc upstream is https://github.com/openland/react-native-webrtc which is a fork of https://github.com/react-native-webrtc/react-native-webrtc
So many forks :)
This... I can't even... https://github.com/react-native-video/react-native-video/issues/2454
Ok, let's postpone the video stuff, that has issues beyond this scope, for now, so back off to 1.47.2.
VT report looks almost ready, https://www.virustotal.com/gui/file/48c1681dce23c1e7853ef125fd96a6f550761e4454e021544568618aef194109/details so I'm close
Recipe so far after a lot of trial and error:
- versionName: 1.47.2
versionCode: 377
commit: d563075c0e3cb21918f9452996a6b813194f04c2
subdir: android/app
sudo:
- sysctl fs.inotify.max_user_watches=524288
- curl -Lo node.tar.xz https://nodejs.org/dist/v16.2.0/node-v16.2.0-linux-x64.tar.xz
- echo "e134c8738761ab908aac3b62efa4865d8a7c73e40cc7758c6e99244921696216 node.tar.xz"
| sha256sum -c -
- tar xJf node.tar.xz
- cp -a node-v16.2.0-linux-x64/. /usr/local/
- npm i -g npm@latest
- npm -g install yarn
init:
- pushd ../..
- sed -i -e "/fs.existsSync('dist')/,+2d" scripts/generate-assets.js
- mkdir -p dist/assets
- sed -i -e 's:84xbA6yRt+pEbYk/OmM9sbJQp7PkSAgqvn0N/QXuj1RKR+upxdAa6vTbTTBA+XweECN6xebCWncGJJiqWrtR1g==:xqr3JVKbdU38+uDYP6p+EENRg/fR2EP2Z9k3CKacDI7RRWKXKeHuB0yRdPsgZuI7XCrp31mU1fGb9Ni5HJYozQ==:g'
package-lock.json
- popd
- npm install --ignore-scripts
patch:
- device-info-non-foss.patch
gradle:
- yes
srclibs:
- react-native-reanimated@2.2.2
rm:
- rm ../../patches/react-native-youtube*
- app/components/post_list/post/body/content/youtube/
- node_modules/xdate/build/compiler.jar
- node_modules/socketcluster/
- node_modules/shaka-player/third_party/closure/compiler.jar
- node_modules/.bin/socketcluster
- node_modules/react-native/template/
- node_modules/jetifier/lib/
- node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/fcm/FcmInstanceIdRefreshHandlerService.java
- node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/fcm/FcmInstanceIdListenerService.java
- node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/fcm/FcmToken.java
prebuild:
- pushd ../..
- npx patch-package --error-on-fail
- sed -i -e '/react-native-youtube/d' package.json
- sed -i -e '/(isYoutubeLink(/,+8d' -e '/youtube/d' app/components/post_list/post/body/content/index.tsx
- sed -i -e '/bintray/d' node_modules/@rudderstack/rudder-sdk-react-native/android/build.gradle
- sed -i -e '/maven {/,+3d' node_modules/react-native-document-picker/android/build.gradle
- sed -i -e '/firebase-messaging/d' node_modules/react-native-notifications/lib/android/app/build.gradle
- sed -i -e '/google-services/d' node_modules/react-native-notifications/lib/android/build.gradle
- sed -E -i '/installreferrer/,+11d' node_modules/react-native-device-info/android/build.gradle
- sed -i -e '/hasPermission/d' -e '/tokenFetchIntent/d' -e '/FcmInstance/d' -e '/FirebaseApp/'d node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
- popd
- "sed -i -e 's/bundleCommand: \"ram-bundle\",/bundleCommand: \"ram-bundle\"\
, nodeExecutableAndArgs: [\"node\", \"--max-old-space-size=12000\"],/' -e\
\ '/firebase/d' -e '/detox/d' -e '/splits {/,+7d' -e '/applicationVariants/,+12d'\
\ build.gradle"
- sed -i -e '55,57d' ../build.gradle
- cd $$react-native-reanimated$$
- yarn install
scanignore:
- android/build.gradle
- node_modules/hermes-engine
- node_modules/jsc-android
- node_modules/react-native/android
- node_modules/@react-native-community/masked-view/android/build.gradle
- node_modules/@react-native-community/netinfo/android/build.gradle
- node_modules/@react-native-community/async-storage/android/build.gradle
- node_modules/react-native-device-info/android/build.gradle
- node_modules/react-native-localize/android/build.gradle
- node_modules/react-native-navigation/lib/android/build.gradle
- node_modules/react-native-notifications/lib/android/build.gradle
- node_modules/react-native-permissions/android/build.gradle
- node_modules/react-native-safe-area-context/android/build.gradle
- node_modules/react-native-screens/android/build.gradle
- node_modules/react-native-share/android/build.gradle
- node_modules/react-native-svg/android/build.gradle
- node_modules/react-native-vector-icons/android/build.gradle
- node_modules/react-native-webview/android/build.gradle
- node_modules/detox/android/build.gradle
- node_modules/detox/android/detox/publishing.gradle
- node_modules/@mattermost/react-native-paste-input/android/build.gradle
- node_modules/@react-native-cookies/cookies/android/build.gradle
- node_modules/react-native-fast-image/android/build.gradle
- node_modules/react-native-mmkv-storage/android/build.gradle
- node_modules/react-native/ReactAndroid/build.gradle
scandelete:
- node_modules
build:
- pushd ../..
- node scripts/generate-assets.js
- ./node_modules/.bin/jetify
- popd
- pushd $$react-native-reanimated$$
- gradle :assembleRelease
- popd
- mv $$react-native-reanimated$$/build/outputs/aar/android-release.aar ../../node_modules/react-native-reanimated/android/react-native-reanimated-65-jsc.aar
ndk: r21e
...so this builds but, crashes on start after the splash :(, log here: https://gist.github.com/licaon-kter/052f88e19782ae4ec4ac270701f1c0bd
Next, will rm more notifications files ( eg. https://github.com/wix/react-native-notifications/issues/207 ) for starters.
/LE: comparing APKs I don't see any missing .so's, reanimated one is kinda 3x smaller though.
Note to future me, don't use npm@latest
since 8.6.0
will fail to find deps on npm install
, same issue seen on https://github.com/conversejs/converse.js so 8.5.5
is the latest you can use (for now)
Is there any ETA when F-Droid release happen? I'm kinda suprised this issue is 5 years old.
My effort can't really go further as I'm not the app developer. I'm happy that I got it to build, but... from here on this needs a dev touch.
My effort can't really go further as I'm not the app developer. I'm happy that I got it to build, but... from here on this needs a dev touch.
Would be very nice, if someone from dev team join a hand. I think it wouldn't take more than 1 MD to preprare it from team member..
I want to have a try but I got
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @rudderstack/rudder-sdk-react-native@1.1.1
npm ERR! Found: react-native@0.67.2
npm ERR! node_modules/react-native
npm ERR! react-native@"0.67.2" from the root project
npm ERR! peer react-native@"*" from @mattermost/react-native-paste-input@0.3.6
npm ERR! node_modules/@mattermost/react-native-paste-input
npm ERR! @mattermost/react-native-paste-input@"0.3.6" from the root project
npm ERR! 44 more (@react-native-async-storage/async-storage, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"0.41.2" from @rudderstack/rudder-sdk-react-native@1.1.1
npm ERR! node_modules/@rudderstack/rudder-sdk-react-native
npm ERR! @rudderstack/rudder-sdk-react-native@"1.1.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react-native@0.41.2
npm ERR! node_modules/react-native
npm ERR! peer react-native@"0.41.2" from @rudderstack/rudder-sdk-react-native@1.1.1
npm ERR! node_modules/@rudderstack/rudder-sdk-react-native
npm ERR! @rudderstack/rudder-sdk-react-native@"1.1.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
when npm install
.
@linsui my recipe above or? Did you read https://github.com/mattermost/mattermost-mobile/issues/566#issuecomment-1092905856 yet?
Oh, my fault. I was thinking 8.11.0 is older that 8.5.5...
Merged thanks to @linsui ref: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/11589
There is something strange though, version in PlayStore is 2.0.0 (and has been for a while now), which introduced multiserver support. Does 1.55 also have that? If so, why the different version numbers? If not, where is 2.0.0 source/release?
See the readme.
I am in the process of moving my NGO to Mattermost seeing the state of F-droid releases, it doesn't seem like that's a wise move. I don't want to recommend our members to install a tracker-filled application and F-droid is the only option. Is my analysis correct?
What would be needed to improve this situation?
See the readme.
@linsui I haven't been able to find what you mean. I opened an issue about this.
The readme said that
This is a work in progress branch for the next major version of the Mattermost mobile app. Once the work is completed and ready to share, this brach will be set as the default branch in this repository.
Now the v2 branch is the default one but there is still no tag for the v2 versions. We can try to build the new versions. I'm not a mattermost user so I don't know if it's good enough.
I kept looking here but no tag, so I didn't bother to test.
I can try to update and test asap.
That's great. Sorry for the confusion. Let's hope there the build goes well :crossed_fingers:.
Summary
Some users don't have google play store but f-droid. Is it possible to provide free builds (with only free and open source libraries)? I don't know if it's possible to build this app with the tools provided by f-droid...