R
Railway3y ago
demo

Docker build failed - PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE

Project ID: d604ae57-452b-43f3-9f81-fb085605c65a Project has issues pip installing google-api-python-client on my prod environment but not the test one. Not sure what leads to this issue.
8 Replies
Adam
Adam3y ago
Have you set the same Nixpacks env variable in both environments?
demo
demoOP3y ago
yeah I deploy regularly to both envs and have the nixpack python version set this has happened once before
Adam
Adam3y ago
Odd what's the error message?
demo
demoOP3y ago
#12 9.295 Collecting google-api-core==2.10.2
#12 9.308 Downloading google_api_core-2.10.2-py3-none-any.whl (115 kB)
#12 9.318 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.6/115.6 kB 18.4 MB/s eta 0:00:00

#12 9.441 Collecting google-api-python-client==2.65.0
#12 9.459 Downloading google_api_python_client-2.65.0-py2.py3-none-any.whl (10.4 MB)
#12 9.521 ━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.1/10.4 MB 128.9 MB/s eta 0:00:01
#12 9.546 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
#12 9.546 google-api-python-client==2.65.0 from https://files.pythonhosted.org/packages/ae/b2/208d059f0605fc5ae643044b7cf1adebc138711dc37b77f2532efcbd1618/google_api_python_client-2.65.0-py2.py3-none-any.whl (from -r requirements.txt (line 18)):
#12 9.546 Expected sha256 2c6611530308b3f931dcf1360713aa3a20cf465d0bf2bac65f2ec99e8c9860de
#12 9.546 Got 4c5ad187c3d26f39dec05f6795856025449698b9c4f742e511b3a10530d67f7f
#12 9.546

#12 9.682
#12 9.682 [notice] A new release of pip available: 22.2.1 -> 22.3
#12 9.682 [notice] To update, run: pip install --upgrade pip

#12 ERROR: executor failed running [/bin/bash -ol pipefail -c python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt]: exit code: 1
-----
> [stage-0 8/8] RUN --mount=type=cache,id=s/c9766d5a-0506-4b50-966f-0e36e1345105-/root/cache/pip,target=/root/.cache/pip python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt:
-----

executor failed running [/bin/bash -ol pipefail -c python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt]: exit code: 1

Error: Docker build failed
#12 9.295 Collecting google-api-core==2.10.2
#12 9.308 Downloading google_api_core-2.10.2-py3-none-any.whl (115 kB)
#12 9.318 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.6/115.6 kB 18.4 MB/s eta 0:00:00

#12 9.441 Collecting google-api-python-client==2.65.0
#12 9.459 Downloading google_api_python_client-2.65.0-py2.py3-none-any.whl (10.4 MB)
#12 9.521 ━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.1/10.4 MB 128.9 MB/s eta 0:00:01
#12 9.546 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
#12 9.546 google-api-python-client==2.65.0 from https://files.pythonhosted.org/packages/ae/b2/208d059f0605fc5ae643044b7cf1adebc138711dc37b77f2532efcbd1618/google_api_python_client-2.65.0-py2.py3-none-any.whl (from -r requirements.txt (line 18)):
#12 9.546 Expected sha256 2c6611530308b3f931dcf1360713aa3a20cf465d0bf2bac65f2ec99e8c9860de
#12 9.546 Got 4c5ad187c3d26f39dec05f6795856025449698b9c4f742e511b3a10530d67f7f
#12 9.546

#12 9.682
#12 9.682 [notice] A new release of pip available: 22.2.1 -> 22.3
#12 9.682 [notice] To update, run: pip install --upgrade pip

#12 ERROR: executor failed running [/bin/bash -ol pipefail -c python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt]: exit code: 1
-----
> [stage-0 8/8] RUN --mount=type=cache,id=s/c9766d5a-0506-4b50-966f-0e36e1345105-/root/cache/pip,target=/root/.cache/pip python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt:
-----

executor failed running [/bin/bash -ol pipefail -c python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt]: exit code: 1

Error: Docker build failed
log snippet only nixpacks variable I have set is NIXPACKS_PYTHON_VERSION
Adam
Adam3y ago
Huh that's super weird Try setting a NIXPACKS_PKGS variable, one of these should do the trick https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=google+api+python At least then both will be consistent. Otherwise I have no idea
demo
demoOP3y ago
I redeployed and it worked again. I think it's got to be some issue with how certain packages are locally cached
Adam
Adam3y ago
Glad to hear it
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server