集成测试有时会失败,
34:35 +84 ~1 -2: test/integration.shard/isolated/native_assets_test.dart: flutter run hot reload and hot restart with native assets macos debug [E]
Expected: not contains 'Invalid argument(s): Couldn\'t resolve native function \'sum\''
Actual: 'warning: Run script build phase \'Run Script\' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target \'Flutter Assemble\' from project \'Runner\')\n'
'Performing hot reload... \n'
'The Flutter DevTools debugger and profiler on macOS is available at: http://127.0.0.1:9106?uri=http://127.0.0.1:53308/xYohxuqAUcQ=/\n'
'Reloaded 0 libraries in 520ms (compile: 8 ms, reload: 0 ms, reassemble: 492 ms).\n'
'\n'
'Performing hot restart... \n'
'Restarted application in 5,343ms.\n'
'\n'
'Performing hot reload... \n'
'\n'
'══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════\n'
'The following ArgumentError was thrown building _FocusInheritedScope:\n'
'Invalid argument(s): Couldn\'t resolve native function \'sum\' in\n'
'\'package:package_with_native_assets/package_with_native_assets_bindings_generated.dart\' : Failed to\n'
'load dynamic library \'package_with_native_assets1.framework/package_with_native_assets1\': Failed to\n'
'load dynamic library \'package_with_native_assets1.framework/package_with_native_assets1\':\n'
'dlopen(package_with_native_assets1.framework/package_with_native_assets1, 0x0001): tried:\n'
'\'package_with_native_assets1.framework/package_with_native_assets1\' (no such file),\n'
'\'/System/Volumes/Preboot/Cryptexes/OSpackage_with_native_assets1.framework/package_with_native_assets1\'\n'
'(no such file),\n'
。我无法在本地重现这个问题。
5条答案
按热度按时间tpxzln5u1#
cc @dcharkes
2exbekwf2#
我已经在本地多次运行了测试,但我也无法重现这个问题。
如果它不稳定,Flutter CI不应该注意到并报告一个P0问题并分配给我(我是测试负责人)。
r6l8ljro3#
我打开了这个,以防你有任何关于这可能是由什么引起的的想法。它看起来像是潜在的问题,与防止重复框架名称(package_with_native_assets1.framework)有关,但在macOS/debug中只有一个架构,所以我不太清楚可能导致这个问题的代码路径。
qpgpyjmq4#
如果不稳定,Flutter CI不应该注意到并报告P0问题并分配给我(我是测试负责人)。
@dcharkes 这个问题发生在
tool_integration_tests_4_4
上,但是不稳定的机器人没有标记它:flutter/TESTOWNERS
c77c0cf的第334行
| | # tool_integration_tests @christopherfujino @flutter/tool |
在最近的三个提交中失败了四次:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8746080258132885809/+/u/run_test.dart_for_tool_integration_tests_shard_and_subshard_4_4/stdout
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8746098371767711457/+/u/run_test.dart_for_tool_integration_tests_shard_and_subshard_4_4/stdout
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8746095741986732209/+/u/run_test.dart_for_tool_integration_tests_shard_and_subshard_4_4/stdout
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8746047964768234769/+/u/run_test.dart_for_tool_integration_tests_shard_and_subshard_4_4/stdout
8dtrkrch5#
我无法在本地复现这个问题,但是检查临时文件夹的单元测试结果如下:
我认为在机器人的热重载或热重启过程中,架构顺序发生了变化,导致了两个不同名称的架构互换。
现在,这些名称本来不应该不同的。这个问题最近已经在iOS上修复(02d5286),但在MacOS上还没有修复。我已经创建了#149761来解决这个问题。