Closed neoapps-dev closed 2 days ago
Summary: Dart application fails to start inside a Docker container due to a permission denied error when creating the .dart-tool
directory. The error originates from the unified_analytics
package.
okay.. i ditched dart:mirrors and now my app works with AOT
here's my Dockerfile,
and the error, ===== Application Startup at 2024-11-28 22:26:40 =====
An unexpected error was encountered by the Dart CLI. Please file an issue at https://github.com/dart-lang/sdk/issues/new with the following details:
Invocation: 'dart run bin/main.dart' Exception: 'PathAccessException: Creation failed, path = '/.dart-tool' (OS Error: Permission denied, errno = 13)' Stack Trace:
0 _Directory.createSync (dart:io/directory_impl.dart:124:7)
1 _File.createSync (dart:io/file_impl.dart:303:14)
2 ForwardingFile.createSync (package:file/src/forwarding/forwarding_file.dart:26:16)
3 createConfigFile (package:unified_analytics/src/initializer.dart:27:14)
4 runInitialization (package:unified_analytics/src/initializer.dart:88:5)
5 new Analytics (package:unified_analytics/src/analytics.dart:82:22)
6 createUnifiedAnalytics (package:dartdev/src/unified_analytics.dart:23:10)
7 DartdevRunner.runCommand (package:dartdev/dartdev.dart:169:27)
8 CommandRunner.run. (package:args/command_runner.dart:122:25)
9 new Future.sync (dart:async/future.dart:313:27)
10 CommandRunner.run (package:args/command_runner.dart:122:14)
11 runDartdev (package:dartdev/dartdev.dart:47:29)
12 main (file:///b/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart:13:11)
13 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:293:33)
14 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
i tried everything but i couldn't get it to work