I am building a docker image which does some object detection on yolov7 and up until recently it has been working perfectly
Then one day I logged into docker hub just to check the status of a build of one of my images and I saw that my builds have all started failing.When I have a look at the logs this is what I get:
ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device: '/tmp/pip-unpacked-wheel-r3egz0yp/torch/lib/libtorch_cuda_cpp.so' -> '/usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda_cpp.so'
I can build this exact image just fine locally but the autobuild just does not work.
Any suggestions?
Here is the build log: (I have removed the previous logs as there were no issues up to this point)
2022-12-14T08:38:58Z #14 [ 8/10] RUN pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113
2022-12-14T08:38:59Z #14 1.429 Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
2022-12-14T08:38:59Z #14 1.701 Collecting torch==1.11.0+cu113
2022-12-14T08:38:59Z #14 1.707 Downloading https://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp38-cp38-linux_x86_64.whl (1637.0 MB)
2022-12-14T08:40:08Z #14 70.63 Collecting torchvision==0.12.0+cu113
2022-12-14T08:40:08Z #14 70.65 Downloading https://download.pytorch.org/whl/cu113/torchvision-0.12.0%2Bcu113-cp38-cp38-linux_x86_64.whl (22.3 MB)
2022-12-14T08:40:10Z #14 72.18 Collecting torchaudio==0.11.0
2022-12-14T08:40:10Z #14 72.19 Downloading https://download.pytorch.org/whl/cu113/torchaudio-0.11.0%2Bcu113-cp38-cp38-linux_x86_64.whl (2.9 MB)
2022-12-14T08:40:10Z #14 72.38 Requirement already satisfied: typing-extensions in /usr/local/lib/python3.8/dist-packages (from torch==1.11.0+cu113) (3.10.0.2)
2022-12-14T08:40:10Z #14 72.39 Requirement already satisfied: numpy in /usr/local/lib/python3.8/dist-packages (from torchvision==0.12.0+cu113) (1.21.2)
2022-12-14T08:40:10Z #14 72.40 Requirement already satisfied: requests in /usr/local/lib/python3.8/dist-packages (from torchvision==0.12.0+cu113) (2.26.0)
2022-12-14T08:40:10Z #14 72.42 Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.8/dist-packages (from torchvision==0.12.0+cu113) (9.2.0)
2022-12-14T08:40:10Z #14 72.44 Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests->torchvision==0.12.0+cu113) (1.26.7)
2022-12-14T08:40:10Z #14 72.46 Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests->torchvision==0.12.0+cu113) (2021.10.8)
2022-12-14T08:40:10Z #14 72.46 Requirement already satisfied: charset-normalizer~=2.0.0; python_version >= "3" in /usr/local/lib/python3.8/dist-packages (from requests->torchvision==0.12.0+cu113) (2.0.7)
2022-12-14T08:40:10Z #14 72.47 Requirement already satisfied: idna<4,>=2.5; python_version >= "3" in /usr/local/lib/python3.8/dist-packages (from requests->torchvision==0.12.0+cu113) (3.3)
2022-12-14T08:40:12Z #14 73.91 Installing collected packages: torch, torchvision, torchaudio
2022-12-14T08:40:12Z #14 73.91 Attempting uninstall: torch
2022-12-14T08:40:12Z #14 73.91 Found existing installation: torch 1.13.0
2022-12-14T08:40:18Z #14 79.92 Uninstalling torch-1.13.0:
2022-12-14T08:40:50Z #14 112.3 Successfully uninstalled torch-1.13.0
2022-12-14T08:41:35Z #14 157.6 Rolling back uninstall of torch
2022-12-14T08:41:35Z #14 157.6 Moving to /usr/local/bin/convert-caffe2-to-onnx
2022-12-14T08:41:35Z #14 157.6 from /tmp/pip-uninstall-21vj9ta9/convert-caffe2-to-onnx
2022-12-14T08:41:35Z #14 157.6 Moving to /usr/local/bin/convert-onnx-to-caffe2
2022-12-14T08:41:35Z #14 157.6 from /tmp/pip-uninstall-21vj9ta9/convert-onnx-to-caffe2
2022-12-14T08:41:35Z #14 157.6 Moving to /usr/local/bin/torchrun
2022-12-14T08:41:35Z #14 157.6 from /tmp/pip-uninstall-21vj9ta9/torchrun
2022-12-14T08:41:35Z #14 157.6 Moving to /usr/local/lib/python3.8/dist-packages/functorch/
2022-12-14T08:41:35Z #14 157.6 from /usr/local/lib/python3.8/dist-packages/~unctorch
2022-12-14T08:41:35Z #14 157.6 Moving to /usr/local/lib/python3.8/dist-packages/torch-1.13.0.dist-info/
2022-12-14T08:41:35Z #14 157.6 from /usr/local/lib/python3.8/dist-packages/~orch-1.13.0.dist-info
2022-12-14T08:41:35Z #14 157.6 Moving to /usr/local/lib/python3.8/dist-packages/torch/
2022-12-14T08:41:35Z #14 157.6 from /usr/local/lib/python3.8/dist-packages/~orch
2022-12-14T08:41:35Z #14 157.6 Moving to /usr/local/lib/python3.8/dist-packages/torchgen/
2022-12-14T08:41:35Z #14 157.6 from /usr/local/lib/python3.8/dist-packages/~orchgen
2022-12-14T08:41:36Z #14 158.1 ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device: '/tmp/pip-unpacked-wheel-bkn_wblz/torch/lib/libtorch_cuda_cpp.so' -> '/usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda_cpp.so'
2022-12-14T08:41:36Z #14 158.1
2022-12-14T08:41:36Z #14 ERROR: executor failed running [/bin/sh -c pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113]: exit code: 1
2022-12-14T08:41:36Z ------
2022-12-14T08:41:36Z > [ 8/10] RUN pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113:
2022-12-14T08:41:36Z #14 157.6 Moving to /usr/local/lib/python3.8/dist-packages/functorch/
2022-12-14T08:41:36Z #14 157.6 from /usr/local/lib/python3.8/dist-packages/~unctorch
2022-12-14T08:41:36Z #14 157.6 Moving to /usr/local/lib/python3.8/dist-packages/torch-1.13.0.dist-info/
2022-12-14T08:41:36Z #14 157.6 from /usr/local/lib/python3.8/dist-packages/~orch-1.13.0.dist-info
2022-12-14T08:41:36Z #14 157.6 Moving to /usr/local/lib/python3.8/dist-packages/torch/
2022-12-14T08:41:36Z #14 157.6 from /usr/local/lib/python3.8/dist-packages/~orch
2022-12-14T08:41:36Z #14 157.6 Moving to /usr/local/lib/python3.8/dist-packages/torchgen/
2022-12-14T08:41:36Z #14 157.6 from /usr/local/lib/python3.8/dist-packages/~orchgen
2022-12-14T08:41:36Z #14 158.1 ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device: '/tmp/pip-unpacked-wheel-bkn_wblz/torch/lib/libtorch_cuda_cpp.so' -> '/usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda_cpp.so'
2022-12-14T08:41:36Z #14 158.1
2022-12-14T08:41:36Z ------
2022-12-14T08:41:36Z ERROR: failed to solve: executor failed running [/bin/sh -c pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113]: exit code: 1
2022-12-14T08:41:36Z Build failed using Buildkit (1)
Related
I am trying to speed up my yarn install types when a package dependency changes. I've tried to repro the issue down to its core.
package.json (random packages, sample)
{
"name": "docker-cache",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"colors": "^1.4.0",
"deep-equal": "2.0.3",
"dotenv": "8.2.0",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-config-react-app": "^6.0.0",
"eslint-loader": "^4.0.2",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"exceljs": "^4.2.1",
"fast-check": "^1.24.2",
"file-loader": "6.0.0",
"find": "0.3.0",
"fs-extra": "9.0.1",
"html-webpack-plugin": "4.3.0",
"jest": "26.2.2",
"jest-canvas-mock": "2.2.0",
"jest-pnp-resolver": "^1.2.1",
"json-diff": "0.5.4",
"lerna": "^3.22.1",
"madge": "^5.0.1",
"mini-css-extract-plugin": "0.9.0",
"mobx-logger": "^0.7.1",
"mutationobserver-shim": "^0.3.7",
"node-fetch": "^2.2.1",
"nodemon": "^2.0.4",
"object-hash": "2.0.3",
"optimize-css-assets-webpack-plugin": "5.0.3",
"pdfjs-dist": "^2.5.207",
"pdfreader": "^1.2.6",
"pnp-webpack-plugin": "^1.6.4",
"postcss": "^8.3.11",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-loader": "^4.0.0",
"postcss-normalize": "^10.0.1",
"postcss-preset-env": "^6.7.0",
"postcss-safe-parser": "^6.0.0",
"prettier": "2.0.5",
"q": "^1.5.1",
"react-dev-utils": "^11.0.4",
"react-error-overlay": "6.0.7",
"react-test-renderer": "16.12.0",
"rimraf": "^3.0.2"
}
}
Dockerfile
FROM node:16.13.0
WORKDIR /tmp/
COPY package.json yarn.lock ./
ENV YARN_CACHE_FOLDER=/root/.yarn
RUN yarn config set cache-folder $YARN_CACHE_FOLDER # just to be explicit
RUN --mount=type=cache,mode=0777,target=$YARN_CACHE_FOLDER yarn cache list
RUN --mount=type=cache,mode=0777,target=$YARN_CACHE_FOLDER YARN_CACHE_FOLDER=$YARN_CACHE_FOLDER yarn install --network-timeout=600000 --frozen-lockfile
CMD ["echo ", "Done"]
Now I run docker buildx build --progress=plain --no-cache -t attempt-1 .
Output of first pass
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 32B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/node:16.13.0
#3 DONE 0.2s
#4 [stage-0 1/6] FROM docker.io/library/node:16.13.0#sha256:580a0850049c59a48f06090edd48c9f966c5e6572bbbabc369ba3ecbc4855dba
#4 DONE 0.0s
#5 [internal] settings cache mount permissions
#5 CACHED
#6 [stage-0 2/6] WORKDIR /tmp/
#6 CACHED
#7 [internal] load build context
#7 transferring context: 509.56kB 0.0s done
#7 DONE 0.0s
#8 [stage-0 3/6] COPY package.json yarn.lock ./
#8 DONE 0.1s
#9 [stage-0 4/6] RUN yarn config set cache-folder /root/.yarn
#9 0.598 yarn config v1.22.15
#9 0.620 success Set "cache-folder" to "/root/.yarn".
#9 0.620 Done in 0.03s.
#9 DONE 0.8s
#10 [stage-0 5/6] RUN --mount=type=cache,mode=0777,target=/root/.yarn yarn cache list
#10 0.370 yarn cache v1.22.15
#10 0.403 Name Version Registry Resolved
#10 0.403 Done in 0.04s.
#10 DONE 0.7s
#11 [stage-0 6/6] RUN --mount=type=cache,mode=0777,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --network-timeout=600000 --frozen-lockfile
#11 0.579 yarn install v1.22.15
#11 0.673 [1/4] Resolving packages...
#11 1.081 [2/4] Fetching packages...
#11 28.26 info fsevents#2.3.2: The platform "linux" is incompatible with this module.
#11 28.26 info "fsevents#2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
#11 28.28 [3/4] Linking dependencies...
#11 28.28 warning " > eslint-config-react-app#6.0.0" has unmet peer dependency "#typescript-eslint/eslint-plugin#^4.0.0".
#11 28.28 warning " > eslint-config-react-app#6.0.0" has unmet peer dependency "#typescript-eslint/parser#^4.0.0".
#11 28.28 warning " > eslint-config-react-app#6.0.0" has unmet peer dependency "babel-eslint#^10.0.0".
#11 28.28 warning " > eslint-loader#4.0.2" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
#11 28.29 warning " > file-loader#6.0.0" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
#11 28.29 warning " > html-webpack-plugin#4.3.0" has unmet peer dependency "webpack#>=4.0.0 < 6.0.0".
#11 28.29 warning "lerna > #lerna/version > #lerna/github-client > #octokit/rest > #octokit/plugin-request-log#1.0.4" has unmet peer dependency "#octokit/core#>=3".
#11 28.29 warning " > mini-css-extract-plugin#0.9.0" has unmet peer dependency "webpack#^4.4.0".
#11 28.29 warning " > mobx-logger#0.7.1" has unmet peer dependency "mobx#>= 4.0.0".
#11 28.29 warning " > optimize-css-assets-webpack-plugin#5.0.3" has unmet peer dependency "webpack#^4.0.0".
#11 28.29 warning " > postcss-loader#4.3.0" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
#11 28.29 warning " > postcss-normalize#10.0.1" has unmet peer dependency "browserslist#>= 4".
#11 28.29 warning "postcss-normalize > postcss-browser-comments#4.0.0" has unmet peer dependency "browserslist#>=4".
#11 28.29 warning " > react-test-renderer#16.12.0" has unmet peer dependency "react#^16.0.0".
#11 44.69 [4/4] Building fresh packages...
#11 45.52 Done in 44.95s.
#11 DONE 46.0s
#12 exporting to image
#12 exporting layers
#12 exporting layers 10.5s done
#12 writing image sha256:5866fab165e759bd4c57c48f85856d98dc2bfa778e1f549a39b36289c8749bbb done
#12 naming to docker.io/library/attempt-1 done
#12 DONE 10.5s
Next I removed the colors package, ran yarn (to update yarn.lock) and re-ran the docker buildx.
Output of second pass
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 32B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/node:16.13.0
#3 DONE 0.5s
#4 [stage-0 1/6] FROM docker.io/library/node:16.13.0#sha256:580a0850049c59a48f06090edd48c9f966c5e6572bbbabc369ba3ecbc4855dba
#4 DONE 0.0s
#5 [internal] settings cache mount permissions
#5 CACHED
#6 [stage-0 2/6] WORKDIR /tmp/
#6 CACHED
#7 [internal] load build context
#7 transferring context: 511.02kB 0.0s done
#7 DONE 0.0s
#8 [stage-0 3/6] COPY package.json yarn.lock ./
#8 DONE 0.0s
#9 [stage-0 4/6] RUN yarn config set cache-folder /root/.yarn
#9 0.341 yarn config v1.22.15
#9 0.372 success Set "cache-folder" to "/root/.yarn".
#9 0.372 Done in 0.04s.
#9 DONE 0.4s
#10 [stage-0 5/6] RUN --mount=type=cache,mode=0777,target=/root/.yarn yarn cache list
#10 0.338 yarn cache v1.22.15
#10 0.368 Name Version Registry Resolved
#10 0.369 Done in 0.03s.
#10 DONE 0.4s
#11 [stage-0 6/6] RUN --mount=type=cache,mode=0777,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --network-timeout=600000 --frozen-lockfile
#11 0.473 yarn install v1.22.15
#11 0.544 [1/4] Resolving packages...
#11 0.949 [2/4] Fetching packages...
#11 27.43 info fsevents#2.3.2: The platform "linux" is incompatible with this module.
#11 27.43 info "fsevents#2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
#11 27.45 [3/4] Linking dependencies...
#11 27.46 warning " > eslint-config-react-app#6.0.0" has unmet peer dependency "#typescript-eslint/eslint-plugin#^4.0.0".
#11 27.46 warning " > eslint-config-react-app#6.0.0" has unmet peer dependency "#typescript-eslint/parser#^4.0.0".
#11 27.46 warning " > eslint-config-react-app#6.0.0" has unmet peer dependency "babel-eslint#^10.0.0".
#11 27.46 warning " > eslint-loader#4.0.2" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
#11 27.46 warning " > file-loader#6.0.0" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
#11 27.46 warning " > html-webpack-plugin#4.3.0" has unmet peer dependency "webpack#>=4.0.0 < 6.0.0".
#11 27.46 warning "lerna > #lerna/version > #lerna/github-client > #octokit/rest > #octokit/plugin-request-log#1.0.4" has unmet peer dependency "#octokit/core#>=3".
#11 27.46 warning " > mini-css-extract-plugin#0.9.0" has unmet peer dependency "webpack#^4.4.0".
#11 27.46 warning " > mobx-logger#0.7.1" has unmet peer dependency "mobx#>= 4.0.0".
#11 27.46 warning " > optimize-css-assets-webpack-plugin#5.0.3" has unmet peer dependency "webpack#^4.0.0".
#11 27.46 warning " > postcss-loader#4.3.0" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
#11 27.46 warning " > postcss-normalize#10.0.1" has unmet peer dependency "browserslist#>= 4".
#11 27.46 warning "postcss-normalize > postcss-browser-comments#4.0.0" has unmet peer dependency "browserslist#>=4".
#11 27.46 warning " > react-test-renderer#16.12.0" has unmet peer dependency "react#^16.0.0".
#11 40.10 [4/4] Building fresh packages...
#11 40.82 Done in 40.35s.
#11 DONE 41.1s
#12 exporting to image
#12 exporting layers
#12 exporting layers 11.8s done
#12 writing image sha256:668320ce0930ff1174cdc14ec5cdc35f4de94e328b04a745ba41ec48643b074c done
#12 naming to docker.io/library/attempt-1 done
#12 DONE 11.8s
As you can see, the second pass look pretty identical to the first. The result of yarn cache list is still empty and it took roughly ~40-46s to complete, indicating that no caching was done.
Output of docker system df -v shows:
hwtq1k2pkn4u exec.cachemount 0B 17 minutes ago 17 seconds ago 14 false
So it is definitely storing it... But it's just empty. I am on macOS.
I have a flutter application that I am trying to generate release for IOS out of it, but I am facing this error:
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
I have tried most of the internet solutions for this error and still get it the same, I am not sure if it is related to something specific or it is a general error, any suggestion would be highly appreciated
flutter build ios --verbose
here is the log:
/Users/husseinajam/Library/Developer/Xcode/DerivedData/Runner-blmaktiwmbrumnfrwrxbcbrwqoqk/Build/Intermediates.noindex/Runner.build/Release-
iphoneos/Runner.build/Script-3B06AD1E1E4923F5004D2608.sh
♦ mkdir -p -- /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Frameworks
♦ rsync -av --delete /Users/husseinajam/Desktop/imim/ios/../ios/Flutter/App.framework
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Frameworks
building file list ... rsync: link_stat "/Users/husseinajam/Desktop/imim/ios/../ios/Flutter/App.framework"
failed: No such file
or directory (2)
done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at
/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
GenerateDSYMFile /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app.dSYM
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Runner (in target 'Runner' from project
'Runner')
cd /Users/husseinajam/Desktop/imim/ios
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Runner -o
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app.dSYM
[+8613 ms] "flutter ios" took 118,982ms.
[ +5 ms] Encountered error while building for device.
[ +2 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1 BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:116:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:977:18)
#3 _rootRunUnary (dart:async/zone.dart:1198:47)
#4 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#7 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#8 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#9 Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#10 _rootRun (dart:async/zone.dart:1190:13)
#11 _CustomZone.run (dart:async/zone.dart:1093:19)
#12 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#13 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#14 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#15 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
[ +744 ms] ensureAnalyticsSent: 257ms
[ +2 ms] Running shutdown hooks
[ ] Shutdown hook priority 4
[ +1 ms] Shutdown hooks complete
[ ] exiting with code 1
have you tried the following;
'flutter clean' command -> run build(if supporting iOS 9 try changing it to iOS 11 for a test)
Updating flutter to the latest version and running and running the first step?
I am using Xcode 12.4
Build Settings -> Targets -> Build Active Architecture Only, set it to Yes.[Debug,Profile & Release for all]
I don't understand, what am I doing wrong. I install (activate) grinder:
$ pub global activate grinder
Then I create a simple tool/grind.dart:
import "dart:io";
import "package:grinder/grinder.dart";
main(args) => grind(args);
#Task("Build")
build() {
Process.run("webdev build", []);
}
But then Process.run() fails of No such file or directory error:
$ grind build
ProcessException: No such file or directory
Command: webdev build
#0 build (...project/tool/grind.dart:33:3)
<asynchronous suspension>
#1 _LocalLibraryMirror._invoke (dart:mirrors/runtime/libmirrors_impl.dart:1104:36)
#2 _LocalObjectMirror.invoke (dart:mirrors/runtime/libmirrors_impl.dart:230:25)
#3 TaskDiscovery.discoverDeclaration.<anon> (package:grinder/src/discover_tasks.dart:79:38)
#4 _rootRun (dart:async/zone.dart:1124:13)
#5 _CustomZone.run (dart:async/zone.dart:1021:19)
#6 _runZoned (dart:async/zone.dart:1516:10)
#7 runZoned (dart:async/zone.dart:1463:12)
#8 ZonedValue.withValue (package:grinder/src/utils.dart:112:12)
#9 GrinderTask.execute (package:grinder/src/grinder_task.dart:64:27)
#10 Grinder._invokeTask (package:grinder/src/grinder.dart:193:27)
#11 Grinder.start.<anon> (package:grinder/src/grinder.dart:168:16)
#12 Future.forEach.<anon> (dart:async/future.dart:486:26)
#13 Future.doWhile.<anon> (dart:async/future.dart:528:26)
#14 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#15 _RootZone.bindUnaryCallbackGuarded.<anon> (dart:async/zone.dart:1353:26)
#16 Future.doWhile (dart:async/future.dart:543:18)
#17 Future.forEach (dart:async/future.dart:484:12)
#18 Grinder.start (package:grinder/src/grinder.dart:167:21)
#19 runTasks (package:grinder/src/cli.dart:67:39)
<asynchronous suspension>
#20 grind (package:grinder/grinder.dart:46:12)
#21 main (...project/tool/grind.dart:9:15)
Even though webdev build does work correctly (is in path)?:
$ webdev build
Creating build script
...
What is the problem here? How could I fix this? Or is there a way to call webdev build programmatically right from Dart code?
The executable must not contain parameters.
Use instead:
Process.run("webdev", ["build"]);
I'm following the Getting Started with Flutter guide and getting stuck when running the actual flutter command:
flutter init -o my_app
Resolving dependencies...
Error on line 17, column 16 of pubspec.yaml: Invalid version constraint: Could not parse version "^1.4.0". Unknown text at "^1.4.0".
stack_trace: ^1.4.0
^^^^^^
Unhandled exception:
Uncaught Error: FileSystemException: Cannot open file, path = '/Users/craig/Code/flutter/packages/flutter_tools/packages/sky_tools/executable.dart' (OS Error: No such file or directory, errno = 2)
Stack Trace:
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:349)
#1 _RootZone.runUnary (dart:async/zone.dart:1151)
#2 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:496)
#3 _Future._propagateToListeners (dart:async/future_impl.dart:579)
#4 _Future._completeWithValue (dart:async/future_impl.dart:339)
#5 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:401)
#6 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#7 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#8 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
Unhandled exception:
Uncaught Error: FileSystemException: Cannot open file, path = '/Users/craig/Code/flutter/bin/cache/flutter_tools.snapshot' (OS Error: No such file or directory, errno = 2)
Stack Trace:
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:349)
#1 _RootZone.runUnary (dart:async/zone.dart:1151)
#2 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:496)
#3 _Future._propagateToListeners (dart:async/future_impl.dart:579)
#4 _Future._completeWithValue (dart:async/future_impl.dart:339)
#5 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:401)
#6 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#7 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#8 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
Looks like your Dart version is outdated < 1.9.2.
Try dart --version to get the version of your installed Dart SDK.
Current is 1.12.x.
Update 2018-03-20
During the migration phase to Dart 2 you might want to install Dart from the dev channel to get a 2.0.0-alpha.x version.
The newest stable version is 1.24.x
For example
brew install dart --devel
Update 2018-06-21
Now also supported:
brew install dart#2
For others who're facing a similar error, I suggest that you read the docs carefully. I didn't, hence I wasted quite some time looking out for the solution elsewhere, even though it was right in front of my eyes all the time: https://flutter.io/setup-macos/#update-your-path
I'm writing the commands down so that you can copy and paste them easily in your terminal window:
touch $HOME/.bash_profile
open $HOME/.bash_profile
Line 1 creates a text file named .bash_profile. Line 2 opens it.
Then the line given below has to be pasted in the text file:
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
Don't forget to save the file after pasting. flutter doctor should work with every Terminal window now.
Open your terminal and run this
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
then run flutter, it will work.
It's because you the path you set up is temporary. To add the path
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
[PATH_TO_FLUTTER_GIT_DIRECTORY] -> Folder where you downloaded flutter or cloned from git.
Then do
echo $PATH
Watch this video to easy install
https://www.youtube.com/watch?v=Em8igImhBKc
When i run the build.dart of my Web Component, the out folder is not created and i receive this error:
SEVERE web/main.html: exception while reading file, original message:
AsyncError: ''package:html5lib/dom.dart': Error: line 91 pos 51: type 'LinkedHashMap' is not loaded
LinkedHashMap<dynamic, String> attributes = new LinkedHashMap();
malformed type used.'
Stack trace:
#0 Node.Node (package:html5lib/dom.dart:91:51)
#1 Document.Document (package:html5lib/dom.dart:313:16)
#2 TreeBuilder.reset (package:html5lib/src/treebuilder.dart:100:16)
#3 TreeBuilder.TreeBuilder (package:html5lib/src/treebuilder.dart:87:10)
#4 HtmlParser.HtmlParser (package:html5lib/parser.dart:148:38)
#5 parseHtml (package:web_ui/src/compiler.dart:34:16)
#6 Compiler._parseHtmlFile.<anonymous closure>.<anonymous closure> (package:web_ui/src/compiler.dart:165:28)
#7 time (package:web_ui/src/utils.dart:38:24)
#8 Compiler._time (package:web_ui/src/compiler.dart:297:16)
#9 Compiler._parseHtmlFile.<anonymous closure> (package:web_ui/src/compiler.dart:164:32)
#10 _ThenFuture._sendValue (dart:async:372:24)
Has anyone the same problem?
Update: thanks for answers. However, i run pub update and now if i run build.dart file the result is:
Uncaught Error: NoSuchMethodError : method not found: 'innerHTML'
Receiver: Instance of 'Element'
Arguments: []
Stack Trace:
#0 Object.noSuchMethod (dart:core-patch:1743:25)
#1 _ElementLoader.visitScriptElement (package:web_ui/src/analyzer.dart:879:16)
#2 _ElementLoader.visitElement (package:web_ui/src/analyzer.dart:770:40)
#3 TreeVisitor.visit (package:html5lib/dom_parsing.dart:208:50)
#4 TreeVisitor.visitChildren (package:html5lib/dom_parsing.dart:220:49)
#5 TreeVisitor.visitNodeFallback (package:html5lib/dom_parsing.dart:228:48)
#6 TreeVisitor.visitElement (package:html5lib/dom_parsing.dart:237:50)
#7 _ElementLoader.visitElement (package:web_ui/src/analyzer.dart:777:34)
#8 TreeVisitor.visit (package:html5lib/dom_parsing.dart:208:50)
#9 TreeVisitor.visitChildren (package:html5lib/dom_parsing.dart:220:49)
#10 TreeVisitor.visitNodeFallback (package:html5lib/dom_parsing.dart:228:48)
#11 TreeVisitor.visitElement (package:html5lib/dom_parsing.dart:237:50)
#12 _ElementLoader.visitElement (package:web_ui/src/analyzer.dart:777:34)
#13 TreeVisitor.visit (package:html5lib/dom_parsing.dart:208:50)
#14 TreeVisitor.visitChildren (package:html5lib/dom_parsing.dart:220:49)
#15 TreeVisitor.visitNodeFallback (package:html5lib/dom_parsing.dart:228:48)
#16 TreeVisitor.visitDocument (package:html5lib/dom_parsing.dart:230:52)
#17 TreeVisitor.visit (package:html5lib/dom_parsing.dart:212:52)
#18 analyzeDefinitions (package:web_ui/src/analyzer.dart:33:15)
#19 Compiler._parseAndDiscover.processHtmlFile.<anonymous closure> (package:web_ui/src/compiler.dart:123:35)
#20 time (package:web_ui/src/utils.dart:38:24)
#21 Compiler._time (package:web_ui/src/compiler.dart:291:16)
#22 Compiler._parseAndDiscover.processHtmlFile (package:web_ui/src /compiler.dart:122:27)
#23 _ThenFuture._sendValue (dart:async:372:24)
I just went through this. It's because the packages you have, haven't been updated. Make sure you are using latest versions of every package, and run pub update.
In my case, I was using an older version of web-ui, which used an older version of html5lib package. I updated web-ui and things worked.
And like Florian said in the other answer, it's caused by a class which has moved to another library.
I recently moved 'LinkedHashMap' from dart:core into dart:collection.
The code you are showing still expects it in core.
Try to find an updated version of the html5lib package (maybe the mailing-list knows where you can download one).
Bob is currently working on versioning the dart-sdk in pub. So hopefully this shouldn't be such a problem in the future.