bitrise-steplib / bitrise-step-flutter-build

MIT License
7 stars 14 forks source link

[Android] Unable to initialize metrics, ensure /Users/vagrant/.android is writable #14

Closed devxpy closed 4 years ago

devxpy commented 4 years ago

Hello, I am trying to build a flutter app using this step, and get the following stack trace when building the android app. ios app builds without errors.

What am I doing wrong here?

[   +2 ms] MSG : Got dependencies!
[  +30 ms] IO  : Writing 6204 characters to text file ./.packages.
[        ] FINE: Contents:
[        ]     | # Generated by pub on 2019-11-14 15:55:43.855588.
[        ]     | _fe_analyzer_shared:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-1.0.0/lib/
[        ]     | analyzer:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/analyzer-0.39.1/lib/
[        ]     | archive:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/archive-2.0.11/lib/
[        ]     | args:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/args-1.5.2/lib/
[        ]     | async:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/async-2.3.0/lib/
[        ]     | boolean_selector:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.5/lib/
[        ]     | cached_network_image:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/cached_network_image-1.1.3/lib/
[        ]     | charcode:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/
[        ]     | cloud_firestore:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.10/lib/
[        ]     | collection:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib/
[        ]     | convert:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/convert-2.1.1/lib/
[        ]     | crypto:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/crypto-2.1.3/lib/
[        ]     | csslib:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/csslib-0.16.1/lib/
[        ]     | dakia:file:///Users/vagrant/.pub-cache/git/dakia-8104c12c37665268efea0d546a68d7f8a2208bd6/client/lib/
[        ]     | dart_style:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/dart_style-1.3.3/lib/
[        ]     | file_picker:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/file_picker-1.4.2/lib/
[        ]     | firebase_auth:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+9/lib/
[        ]     | firebase_core:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.1+5/lib/
[        ]     | firebase_storage:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.0.8/lib/
[        ]     | fixnum:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/fixnum-0.10.11/lib/
[        ]     | flutter:file:///Users/vagrant/flutter-sdk/flutter/packages/flutter/lib/
[        ]     | flutter_cache_manager:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/flutter_cache_manager-1.1.3/lib/
[        ]     | flutter_launcher_icons:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.7.4/lib/
[        ]     | flutter_markdown:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/flutter_markdown-0.3.0/lib/
[        ]     | flutter_test:file:///Users/vagrant/flutter-sdk/flutter/packages/flutter_test/lib/
[        ]     | front_end:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.29/lib/
[        ]     | glob:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/glob-1.2.0/lib/
[        ]     | google_sign_in:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.13/lib/
[        ]     | html:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/html-0.14.0+3/lib/
[        ]     | http:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+2/lib/
[        ]     | http_parser:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib/
[        ]     | image:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/image-2.1.8/lib/
[        ]     | image_picker:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.1+11/lib/
[        ]     | js:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/
[        ]     | kernel:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.29/lib/
[        ]     | markdown:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/markdown-2.1.1/lib/
[        ]     | matcher:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.5/lib/
[        ]     | meta:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/meta-1.1.7/lib/
[        ]     | node_interop:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/node_interop-1.0.3/lib/
[        ]     | node_io:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/node_io-1.0.1+2/lib/
[        ]     | package_config:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/package_config-1.1.0/lib/
[        ]     | path:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/path-1.6.4/lib/
[        ]     | path_provider:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/path_provider-1.4.2/lib/
[        ]     | pedantic:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/pedantic-1.8.0+1/lib/
[        ]     | petitparser:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/petitparser-2.4.0/lib/
[        ]     | photo_view:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/photo_view-0.8.0/lib/
[        ]     | platform:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/platform-2.2.1/lib/
[        ]     | protobuf:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/protobuf-1.0.1/lib/
[        ]     | protoc_plugin:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/protoc_plugin-19.0.1/lib/
[        ]     | pub_semver:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib/
[        ]     | quiver:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.5/lib/
[        ]     | sky_engine:file:///Users/vagrant/flutter-sdk/flutter/bin/cache/pkg/sky_engine/lib/
[        ]     | source_span:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/source_span-1.5.5/lib/
[        ]     | sqflite:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.7+2/lib/
[        ]     | stack_trace:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib/
[        ]     | stream_channel:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.0.0/lib/
[        ]     | string_scanner:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5/lib/
[        ]     | synchronized:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/synchronized-2.1.0+1/lib/
[        ]     | term_glyph:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib/
[        ]     | test_api:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.5/lib/
[        ]     | typed_data:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/
[        ]     | url_launcher:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.2.5/lib/
[        ]     | url_launcher_platform_interface:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/url_launcher_platform_interface-1.0.1/lib/
[        ]     | uuid:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/uuid-2.0.4/lib/
[        ]     | vector_math:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib/
[        ]     | watcher:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+12/lib/
[        ]     | xml:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/xml-3.5.0/lib/
[        ]     | yaml:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/yaml-2.2.0/lib/
[        ]     | dara:lib/
[  +40 ms] Running "flutter pub get" in client... (completed in 12.3s)
[ +126 ms] Found plugin cloud_firestore at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.10/
[  +20 ms] Found plugin file_picker at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/file_picker-1.4.2/
[   +3 ms] Found plugin firebase_auth at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+9/
[   +2 ms] Found plugin firebase_core at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.1+5/
[   +2 ms] Found plugin firebase_storage at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.0.8/
[  +25 ms] Found plugin google_sign_in at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.13/
[  +12 ms] Found plugin image_picker at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.1+11/
[  +19 ms] Found plugin path_provider at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/path_provider-1.4.2/
[  +14 ms] Found plugin sqflite at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.7+2/
[  +10 ms] Found plugin url_launcher at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.2.5/
[ +139 ms] Found plugin cloud_firestore at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.10/
[   +7 ms] Found plugin file_picker at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/file_picker-1.4.2/
[   +4 ms] Found plugin firebase_auth at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+9/
[   +2 ms] Found plugin firebase_core at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.1+5/
[   +1 ms] Found plugin firebase_storage at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.0.8/
[  +18 ms] Found plugin google_sign_in at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.13/
[   +8 ms] Found plugin image_picker at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.1+11/
[  +10 ms] Found plugin path_provider at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/path_provider-1.4.2/
[  +13 ms] Found plugin sqflite at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.7+2/
[   +7 ms] Found plugin url_launcher at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.2.5/
[ +226 ms] You are building a fat APK that includes binaries for android-arm, android-arm64.
[        ] If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
[        ]     To generate an app bundle, run:
[        ]         flutter build appbundle --target-platform android-arm,android-arm64
[        ]         Learn more on: https://developer.android.com/guide/app-bundle
[        ]     To split the APKs per ABI, run:
[        ]         flutter build apk --target-platform android-arm,android-arm64 --split-per-abi
[        ]         Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
[  +10 ms] Initializing gradle...
[  +25 ms] Using gradle from /Users/vagrant/git/client/android/gradlew.
[  +15 ms] executing: /Users/vagrant/git/client/android/gradlew -v
[+14724 ms] Downloading https://services.gradle.org/distributions/gradle-5.6.2-all.zip
            .....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
            Unzipping /Users/vagrant/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb/gradle-5.6.2-all.zip to /Users/vagrant/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb
            Set executable permissions for: /Users/vagrant/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb/gradle-5.6.2/bin/gradle
            Welcome to Gradle 5.6.2!
            Here are the highlights of this release:
             - Incremental Groovy compilation
             - Groovy compile avoidance
             - Test fixtures for Java projects
             - Manage plugin versions via settings script
            For more details see https://docs.gradle.org/5.6.2/release-notes.html
            ------------------------------------------------------------
            Gradle 5.6.2
            ------------------------------------------------------------
            Build time:   2019-09-05 16:13:54 UTC
            Revision:     55a5e53d855db8fc7b0e494412fc624051a8e781
            Kotlin:       1.3.41
            Groovy:       2.5.4
            Ant:          Apache Ant(TM) version 1.9.14 compiled on March 12 2019
            JVM:          1.8.0_222 (AdoptOpenJDK 25.222-b10)
            OS:           Mac OS X 10.14.6 x86_64
[        ] Initializing gradle... (completed in 14.8s)
[  +15 ms] Resolving dependencies...
[        ] executing: [/Users/vagrant/git/client/android/] /Users/vagrant/git/client/android/gradlew app:properties
[+68951 ms] Starting a Gradle Daemon (subsequent builds will be faster)
            > Configure project :app
            Unable to initialize metrics, ensure /Users/vagrant/.android is writable, details: Unable to lock settings file /Users/vagrant/.android/analytics.settings
[   +6 ms] Resolving dependencies... (completed in 69.0s)
[   +3 ms] * Error running Gradle:
           ProcessException: Process "/Users/vagrant/git/client/android/gradlew" exited abnormally:
           Starting a Gradle Daemon (subsequent builds will be faster)
           > Configure project :app
           Unable to initialize metrics, ensure /Users/vagrant/.android is writable, details: Unable to lock settings file /Users/vagrant/.android/analytics.settings
             Command: /Users/vagrant/git/client/android/gradlew app:properties
[   +3 ms] "flutter apk" took 96,828ms.
Please review your Gradle project setup in the android/ folder.
#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      _readGradleProject (package:flutter_tools/src/android/gradle.dart:233:7)
<asynchronous suspension>
#2      _gradleAppProject (package:flutter_tools/src/android/gradle.dart:112:37)
<asynchronous suspension>
#3      _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:652:39)
<asynchronous suspension>
#4      buildGradleProject (package:flutter_tools/src/android/gradle.dart:494:14)
<asynchronous suspension>
#5      buildApk (package:flutter_tools/src/android/apk.dart:34:9)
<asynchronous suspension>
#6      BuildApkCommand.runCommand (package:flutter_tools/src/commands/build_apk.dart:79:11)
<asynchronous suspension>
#7      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:490:18)
<asynchronous suspension>
#8      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:407:33)
<asynchronous suspension>
#9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#10     _rootRun (dart:async/zone.dart:1124:13)
#11     _CustomZone.run (dart:async/zone.dart:1021:19)
#12     _runZoned (dart:async/zone.dart:1516:10)
#13     runZoned (dart:async/zone.dart:1463:12)
#14     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#15     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:397:20)
#16     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
<asynchronous suspension>
#17     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:402:21)
<asynchronous suspension>
#18     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#19     _rootRun (dart:async/zone.dart:1124:13)
#20     _CustomZone.run (dart:async/zone.dart:1021:19)
#21     _runZoned (dart:async/zone.dart:1516:10)
#22     runZoned (dart:async/zone.dart:1463:12)
#23     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#24     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
<asynchronous suspension>
#25     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#26     new Future.sync (dart:async/future.dart:224:31)
#27     CommandRunner.run (package:args/command_runner.dart:112:14)
#28     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
#29     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
<asynchronous suspension>
#30     _rootRun (dart:async/zone.dart:1124:13)
#31     _CustomZone.run (dart:async/zone.dart:1021:19)
#32     _runZoned (dart:async/zone.dart:1516:10)
#33     runZoned (dart:async/zone.dart:1500:12)
#34     run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
<asynchronous suspension>
#35     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#36     _rootRun (dart:async/zone.dart:1124:13)
#37     _CustomZone.run (dart:async/zone.dart:1021:19)
#38     _runZoned (dart:async/zone.dart:1516:10)
#39     runZoned (dart:async/zone.dart:1463:12)
#40     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#41     runInContext (package:flutter_tools/src/context_runner.dart:59:24)
<asynchronous suspension>
#42     run (package:flutter_tools/runner.dart:50:10)
#43     main (package:flutter_tools/executable.dart:65:9)
<asynchronous suspension>
#44     main (file:///Users/vagrant/flutter-sdk/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#45     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
#46     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
bitce commented 4 years ago

Hi @devxpy

I’m really sorry about the delay in getting to your issue. We are currently migrating to a new system in order to be able to assist you better in the future.

Due to the considerable delay please let us know if your issue still requires investigation; please send us a short message and also attach the related build's URL. Again, apologies for the delay, going forward we’ll do our best to offer quicker replies. Thanks!

devxpy commented 4 years ago

I am now using codemagic because that actually works.