Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[native_assets_builder] Git errors on invoking hooks #1847

Open
dcharkes opened this issue Dec 30, 2024 · 2 comments
Open

[native_assets_builder] Git errors on invoking hooks #1847

dcharkes opened this issue Dec 30, 2024 · 2 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures package:native_assets_builder

Comments

@dcharkes
Copy link
Collaborator

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8727104420872302577/+/u/run_test.dart_for_tool_integration_tests_shard_and_subshard_5_5/stdout

[        ] Running `ANDROID_HOME=/Volumes/Work/s/w/ir/cache/android/sdk TMPDIR=/Volumes/Work/s/w/ir/x/t TEMP=/Volumes/Work/s/w/ir/x/t PATH=/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Library/Xcode/Plug-ins/XCBSpecifications.ideplugin/Contents/Resources:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Library/Xcode/Plug-ins/XCBSpecifications.ideplugin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/appleinternal/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/appleinternal/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/local/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/local/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/usr/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/usr/local/bin:/Volumes/Work/s/w/ir/cache/ruby/bin:/Volumes/Work/s/w/ir/x/w/flutter/bin:/Volumes/Work/s/w/ir/x/w/flutter/bin/cache/dart-sdk/bin:/Volumes/Work/s/w/ir/cache/chrome/chrome:/Volumes/Work/s/w/ir/cache/chrome/drivers:/Volumes/Work/s/w/ir/cache/java/contents/Home/bin:/Volumes/Work/s/w/ir/bbagent_utility_packages:/Volumes/Work/s/w/ir/bbagent_utility_packages/bin:/Volumes/Work/s/w/ir/cipd_bin_packages:/Volumes/Work/s/w/ir/cipd_bin_packages/bin:/Volumes/Work/s/w/ir/cipd_bin_packages/cpython3:/Volumes/Work/s/w/ir/cipd_bin_packages/cpython3/bin:/Volumes/Work/s/w/ir/cache/cipd_client:/Volumes/Work/s/w/ir/cache/cipd_client/bin:/Volumes/Work/s/cipd_cache/bin:/opt/infra-tools:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/local/git/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOME=/Users/chrome-bot TMP=/Volumes/Work/s/w/ir/x/t /Volumes/Work/s/w/ir/x/w/flutter/bin/dart --packages=/Volumes/Work/s/w/ir/x/t/8oo7bh/uses_package_native_assets_cli/.dart_tool/package_config.json /Volumes/Work/s/w/ir/x/t/8oo7bh/uses_package_native_assets_cli/.dart_tool/native_assets_builder/db695ec90c18f778434de1b29c08c462/hook.dill --config=/Volumes/Work/s/w/ir/x/t/8oo7bh/uses_package_native_assets_cli/.dart_tool/native_assets_builder/db695ec90c18f778434de1b29c08c462/config.json`.

[   +1 ms] Persisting file store

[   +3 ms] Done persisting file store

[   +3 ms] "flutter assemble" took 6,081ms.

[        ] Running 2 shutdown hooks

[        ] Shutdown hooks complete

[        ] exiting with code 1

error: [  +39 ms] fatal: Not a valid object name origin/master

[   +1 ms]   Building assets for package:uses_package_native_assets_cli failed.

This looks like it is related to tying down the environment variables. It's unclear what environment variable is missing that causes a git issue. Possibly, the Flutter SDK is pinging home with it's flutter_tools logic looking at what branch it is on?

It's not reproducible locally for me.

Context:

@dcharkes dcharkes self-assigned this Dec 30, 2024
@dcharkes dcharkes added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Dec 30, 2024
@dcharkes
Copy link
Collaborator Author

dcharkes commented Dec 30, 2024

[2024-12-30 10:07:51.286688] [STDOUT] stderr: fatal: Not a valid object name origin/master
[2024-12-30 10:07:51.286688] [STDOUT] stderr: Error: Unable to determine engine version... 
[2024-12-30 10:07:51.286688] [STDOUT] stderr:   Building assets for package:ffi_package failed.
[2024-12-30 10:07:51.286688] [STDOUT] stderr:   build.dart returned with exit code: 1.
[2024-12-30 10:07:51.286688] [STDOUT] stderr:   To reproduce run:
[2024-12-30 10:07:51.286688] [STDOUT] stderr:   C:\b\s\w\ir\x\w\rc\tmprpq8zzff\flutter sdk\bin\dart --packages=C:\b\s\w\ir\x\t\flutter_module_test.ed577fda\hello\.dart_tool\package_config.json C:\b\s\w\ir\x\t\flutter_module_test.ed577fda\hello\.dart_tool\native_assets_builder\755ebf6d30040ac7ce9fb4d3c5afe976\hook.dill --config=C:\b\s\w\ir\x\t\flutter_module_test.ed577fda\hello\.dart_tool\native_assets_builder\755ebf6d30040ac7ce9fb4d3c5afe976\config.json
[2024-12-30 10:07:51.286688] [STDOUT] stderr:   stderr:
[2024-12-30 10:07:51.286688] [STDOUT] stderr:   fatal: Not a valid object name origin/master
[2024-12-30 10:07:51.286688] [STDOUT] stderr: Error: Unable to determine engine version... 

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8727104420706748945/+/u/run_build_android_host_app_with_module_aar/stdout

It does look like a phone home issue.

ECHO Error: Unable to determine engine version... 1>&2

https://github.com/flutter/flutter/blob/9fd5bddc65c3616a5a0ba9af44e1bd7fe8c99c1d/bin/internal/shared.bat#L129

@dcharkes
Copy link
Collaborator Author

dcharkes commented Jan 2, 2025

Rolling in #1848 with flutter/flutter#160672 doesn't fix the issue: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8727054518249061777/+/u/run_test.dart_for_tool_integration_tests_shard_and_subshard_5_5/stdout

[  +53 ms] [        ] Running `ANDROID_HOME=/Volumes/Work/s/w/ir/cache/android/sdk TMPDIR=/Volumes/Work/s/w/ir/x/t TEMP=/Volumes/Work/s/w/ir/x/t FLUTTER_ROOT=/Volumes/Work/s/w/ir/x/w/flutter PATH=/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Library/Xcode/Plug-ins/XCBSpecifications.ideplugin/Contents/Resources:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Library/Xcode/Plug-ins/XCBSpecifications.ideplugin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/appleinternal/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/MacOSX.platform/usr/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/MacOSX.platform/usr/appleinternal/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/MacOSX.platform/usr/local/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/local/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/usr/bin:/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/usr/local/bin:/Volumes/Work/s/w/ir/cache/ruby/bin:/Volumes/Work/s/w/ir/x/w/flutter/bin:/Volumes/Work/s/w/ir/x/w/flutter/bin/cache/dart-sdk/bin:/Volumes/Work/s/w/ir/cache/chrome/chrome:/Volumes/Work/s/w/ir/cache/chrome/drivers:/Volumes/Work/s/w/ir/cache/java/contents/Home/bin:/Volumes/Work/s/w/ir/bbagent_utility_packages:/Volumes/Work/s/w/ir/bbagent_utility_packages/bin:/Volumes/Work/s/w/ir/cipd_bin_packages:/Volumes/Work/s/w/ir/cipd_bin_packages/bin:/Volumes/Work/s/w/ir/cipd_bin_packages/cpython3:/Volumes/Work/s/w/ir/cipd_bin_packages/cpython3/bin:/Volumes/Work/s/w/ir/cache/cipd_client:/Volumes/Work/s/w/ir/cache/cipd_client/bin:/Volumes/Work/s/cipd_cache/bin:/opt/infra-tools:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/local/git/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOME=/Users/chrome-bot TMP=/Volumes/Work/s/w/ir/x/t /Volumes/Work/s/w/ir/x/w/flutter/bin/dart --packages=/Volumes/Work/s/w/ir/x/t/UUUr2M/uses_package_native_assets_cli/.dart_tool/package_config.json /Volumes/Work/s/w/ir/x/t/UUUr2M/uses_package_native_assets_cli/.dart_tool/native_assets_builder/aa1a49da1e015a4bf66925b53a59baa2/hook.dill --config=/Volumes/Work/s/w/ir/x/t/UUUr2M/uses_package_native_assets_cli/.dart_tool/native_assets_builder/aa1a49da1e015a4bf66925b53a59baa2/config.json`.

[        ] [  +41 ms] fatal: Not a valid object name origin/master

[        ] [   +1 ms]   Building assets for package:uses_package_native_assets_cli failed.

[        ]              build.dart returned with exit code: 128.

To be able to iterate more efficiently, we should make the environment configurable in native_assets_builder so flutter_tools can filter by itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures package:native_assets_builder
Projects
None yet
Development

No branches or pull requests

1 participant