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

Error when creating scratch orgs #2130

Open
zedgell opened this issue Jun 8, 2023 · 7 comments
Open

Error when creating scratch orgs #2130

zedgell opened this issue Jun 8, 2023 · 7 comments

Comments

@zedgell
Copy link

zedgell commented Jun 8, 2023

I am receiving an error when creating a scratch org.

The last line of the log is “/app/.heroku/python/bin/python: error while loading shared libraries: libpython3.10.so.1.0: cannot open shared object file: No such file or directory”

To replicate:

  • Create an empty project via Metecho

  • Try to spawn a scratch org.

@jstvz
Copy link
Contributor

jstvz commented Jun 8, 2023

Thanks for the report, @zedgell . Would you mind providing a full traceback along with details on your environment (Heroku vs Docker, OS, etc)?

@davidmreed
Copy link
Contributor

We've definitely seen this before on Heroku. I have a dim memory that it may have been the issue we fixed in #2057.

@zedgell
Copy link
Author

zedgell commented Jun 9, 2023

@jstvz This is running on Heroku stack 22 basic dynos. I pulled the latest commits from main and still received the same error. Below is the error log from the worker. I have also tried on Heroku stack 20 and still the same error. I have also attempted to add the libpython3.10-dev package via apt using the apt build pack(https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku-community/apt.tgz) and that did not work either.

2023-06-09T05:06:46.341613+00:00 app[worker.1]:   File \"/app/metecho/api/jobs.py\", line 415, in _create_org_and_run_flow
2023-06-09T05:06:46.341613+00:00 app[worker.1]:     run_flow(
2023-06-09T05:06:46.341614+00:00 app[worker.1]:   File \"/app/metecho/api/sf_run_flow.py\", line 425, in run_flow
2023-06-09T05:06:46.341614+00:00 app[worker.1]:     raise SubcommandException(
2023-06-09T05:06:46.341615+00:00 app[worker.1]: metecho.exceptions.SubcommandException: /app/.heroku/python/bin/python: error while loading shared libraries: libpython3.10.so.1.0: cannot open shared object file: No such file or directory
2023-06-09T05:06:46.341615+00:00 app[worker.1]: "
2023-06-09T05:06:46.354396+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:06:46.354245" tag=external module=worker msg="default: metecho.api.jobs.delete_scratch_org(<ScratchOrg: ScratchOrg object (Z2gbY8D)>, originating_user_id='xA8R68P') (a40b10c9-2efc-4dd5-9b9b-45f5d9f53af6)"
2023-06-09T05:06:47.521852+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:06:47.521704" tag=external module=worker msg="default: Job OK (a40b10c9-2efc-4dd5-9b9b-45f5d9f53af6)"
2023-06-09T05:06:47.522108+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:06:47.521854" tag=external module=worker msg="Result is kept for 500 seconds"
2023-06-09T05:06:47.536107+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:06:47.535743" tag=external module=worker msg="default: metecho.api.jobs.delete_scratch_org(<ScratchOrg: ScratchOrg object (Z2gbY8D)>, originating_user_id=None) (dfb37db4-cd71-4d6f-bfe5-1a12716cd8dc)"
2023-06-09T05:06:48.980401+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:06:48.980268" tag=external module=worker msg="default: Job OK (dfb37db4-cd71-4d6f-bfe5-1a12716cd8dc)"
2023-06-09T05:06:48.980620+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:06:48.980390" tag=external module=worker msg="Result is kept for 500 seconds"
2023-06-09T05:06:58.583487+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:06:58.583309" tag=external module=worker msg="default: metecho.api.jobs.create_branches_on_github_then_create_scratch_org(originating_user_id='xA8R68P', scratch_org=<ScratchOrg: ScratchOrg object (ZAge6d1)>) (9f72cc93-06ce-4ea5-a959-9777faa5aee7)"
2023-06-09T05:07:28.800354+00:00 app[worker.1]: /app/.heroku/python/lib/python3.10/site-packages/django/db/models/fields/__init__.py:1534: RuntimeWarning: DateTimeField ScratchOrg.expires_at received a naive datetime (2023-07-09 05:07:19.029614) while time zone support is active.
2023-06-09T05:07:28.800463+00:00 app[worker.1]:   warnings.warn(
2023-06-09T05:07:28.841275+00:00 app[worker.1]: Traceback (most recent call last):
2023-06-09T05:07:28.841277+00:00 app[worker.1]:   File "/app/metecho/api/jobs.py", line 480, in create_branches_on_github_then_create_scratch_org
2023-06-09T05:07:28.841278+00:00 app[worker.1]:     _create_org_and_run_flow(
2023-06-09T05:07:28.841279+00:00 app[worker.1]:   File "/app/metecho/api/jobs.py", line 415, in _create_org_and_run_flow
2023-06-09T05:07:28.841281+00:00 app[worker.1]:     run_flow(
2023-06-09T05:07:28.841282+00:00 app[worker.1]:   File "/app/metecho/api/sf_run_flow.py", line 425, in run_flow
2023-06-09T05:07:28.841282+00:00 app[worker.1]:     raise SubcommandException(
2023-06-09T05:07:28.841283+00:00 app[worker.1]: metecho.exceptions.SubcommandException: /app/.heroku/python/bin/python: error while loading shared libraries: libpython3.10.so.1.0: cannot open shared object file: No such file or directory
2023-06-09T05:07:28.841283+00:00 app[worker.1]: 
2023-06-09T05:07:28.843006+00:00 app[worker.1]: id=no-job-id at=ERROR time="2023-06-09 05:07:28.842914" tag=external module=worker msg="Traceback (most recent call last):
2023-06-09T05:07:28.843006+00:00 app[worker.1]:   File \"/app/.heroku/python/lib/python3.10/site-packages/rq/worker.py\", line 1061, in perform_job
2023-06-09T05:07:28.843007+00:00 app[worker.1]:     rv = job.perform()
2023-06-09T05:07:28.843008+00:00 app[worker.1]:   File \"/app/.heroku/python/lib/python3.10/site-packages/rq/job.py\", line 821, in perform
2023-06-09T05:07:28.843008+00:00 app[worker.1]:     self._result = self._execute()
2023-06-09T05:07:28.843008+00:00 app[worker.1]:   File \"/app/.heroku/python/lib/python3.10/site-packages/rq/job.py\", line 844, in _execute
2023-06-09T05:07:28.843009+00:00 app[worker.1]:     result = self.func(*self.args, **self.kwargs)
2023-06-09T05:07:28.843009+00:00 app[worker.1]:   File \"/app/metecho/api/jobs.py\", line 480, in create_branches_on_github_then_create_scratch_org
2023-06-09T05:07:28.843009+00:00 app[worker.1]:     _create_org_and_run_flow(
2023-06-09T05:07:28.843010+00:00 app[worker.1]:   File \"/app/metecho/api/jobs.py\", line 415, in _create_org_and_run_flow
2023-06-09T05:07:28.843010+00:00 app[worker.1]:     run_flow(
2023-06-09T05:07:28.843010+00:00 app[worker.1]:   File \"/app/metecho/api/sf_run_flow.py\", line 425, in run_flow
2023-06-09T05:07:28.843010+00:00 app[worker.1]:     raise SubcommandException(
2023-06-09T05:07:28.843011+00:00 app[worker.1]: metecho.exceptions.SubcommandException: /app/.heroku/python/bin/python: error while loading shared libraries: libpython3.10.so.1.0: cannot open shared object file: No such file or directory
2023-06-09T05:07:28.843011+00:00 app[worker.1]: "
2023-06-09T05:07:28.855188+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:07:28.855035" tag=external module=worker msg="default: metecho.api.jobs.delete_scratch_org(<ScratchOrg: ScratchOrg object (ZAge6d1)>, originating_user_id='xA8R68P') (d24e8049-4ded-4a6e-8a55-dae78ca9aa4d)"
2023-06-09T05:07:29.912714+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:07:29.912573" tag=external module=worker msg="default: Job OK (d24e8049-4ded-4a6e-8a55-dae78ca9aa4d)"
2023-06-09T05:07:29.912898+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:07:29.912703" tag=external module=worker msg="Result is kept for 500 seconds"
2023-06-09T05:07:29.925755+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:07:29.925576" tag=external module=worker msg="default: metecho.api.jobs.delete_scratch_org(<ScratchOrg: ScratchOrg object (ZAge6d1)>, originating_user_id=None) (f35db405-b406-4ed2-8db6-3d3344c5fd20)"
2023-06-09T05:07:30.687971+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:07:30.687839" tag=external module=worker msg="default: Job OK (f35db405-b406-4ed2-8db6-3d3344c5fd20)"
2023-06-09T05:07:30.688185+00:00 app[worker.1]: id=no-job-id at=INFO time="2023-06-09 05:07:30.687967" tag=external module=worker msg="Result is kept for 500 seconds"

@zedgell
Copy link
Author

zedgell commented Jun 16, 2023

@davidmreed or @jstvz any idea on the cause of this? I still have not found a solution.

@krishnakolluneocol
Copy link

Hi @zedgell - Did you ever find a workaround to this?

@zedgell
Copy link
Author

zedgell commented Nov 10, 2023

@krishnakolluneocol I ended up modifying the docker image and just deploying that directly to Heroku.

@jhilyard
Copy link

jhilyard commented May 9, 2024

I just ran into this so it's not fixed in the current build.
What worked for me I found at https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000K0s1eSAB:
Use Heroku CLI to run: heroku labs:enable runtime-dyno-metadata -a <appname> and then re-deploy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants