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: Couldn't load project data at path ".". Is the .pck file missing? #89825

Closed
wpbirney opened this issue Mar 23, 2024 · 9 comments · Fixed by #90476
Closed

Error: Couldn't load project data at path ".". Is the .pck file missing? #89825

wpbirney opened this issue Mar 23, 2024 · 9 comments · Fixed by #90476

Comments

@wpbirney
Copy link

Tested versions

System information

Godot v4.3.dev (fe01776) - Void #1 SMP PREEMPT_DYNAMIC Fri Mar 8 01:01:43 UTC 2024 - Vulkan (Forward+) - dedicated AMD Radeon RX 7900 XTX (RADV NAVI31) () - AMD Ryzen 9 7950X 16-Core Processor (32 Threads)

Issue description

Getting Error: Couldn't load project data at path ".". Is the .pck file missing? when running a build of the engine in same directory as the same named pck. Same error when using --main-pack.

git revert 5e6adb4a2dd947432e59ca00b6d046a68c534e10 fixes the issue

Steps to reproduce

  • Make an empty project on linux with a master build of godot
  • add a main scene and attach a script with a class_name
  • export the pck
  • copy the godot binary to the same location and rename to match pck
  • run

Minimal reproduction project (MRP)

N/A

@wpbirney
Copy link
Author

wpbirney commented Mar 26, 2024

I dug into this a little today and noticed that after 5a6adb4 my exported pck from the editor no longer contains res://project.binary which is causing the issue.

@wpbirney
Copy link
Author

5e6adb4#diff-a64507e1723f451757967d0bcb08c8e8999bc77b5d4863e9c71133432140b17fR1798

changing this to true made my pck's exported via the editor have all the required files again.

@akien-mga
Copy link
Member

CC @ogapo @mihe

@akien-mga akien-mga added this to the 4.3 milestone Mar 26, 2024
@ogapo
Copy link
Contributor

ogapo commented Mar 26, 2024

Sounds like the way you are exporting (or an error in the code) is creating a non-main PCK rather than a runnable one. My understanding is that in the export dialog "Export Project" makes a full PCK (with the project file and icons and such) and "Export PCK/Zip" is intended to make content-only PCKs (suitable for DLC).

Source (assuming I'm interpreting correctly) https://docs.godotengine.org/en/stable/tutorials/export/exporting_projects.html

Are you doing Export Project?

@akien-mga
Copy link
Member

My understanding is that in the export dialog "Export Project" makes a full PCK (with the project file and icons and such) and "Export PCK/Zip" is intended to make content-only PCKs (suitable for DLC).

Source (assuming I'm interpreting correctly) https://docs.godotengine.org/en/stable/tutorials/export/exporting_projects.html

That's a misinterpretation, "Export PCK/Zip" should (at least by default) export the exact same PCK file that "Export Project" would.

Export PCK/ZIP: Export the project resources as a PCK or ZIP package. This is not a playable build, it only exports the project data without a Godot executable.

With such a PCK, you can run Godot with godot --main-pack data.pck and it should run fine.

@mihe
Copy link
Contributor

mihe commented Mar 27, 2024

I'll admit to having missed this use-case as well, but I see now that it's also quite clearly spelled out under "Export approaches" on the "Exporting for dedicated servers" page:

Export a PCK file only, preferably for the platform that matches the platform that will host the server. Place this PCK file in the same folder as an export template binary, rename the binary to have the same name as the PCK (minus the file extension), then run the binary.

This is somewhat of a quick kneejerk fix, and largely untested, but it seemed like a straight-forward and reasonable compromise: #89928

Let me know what you think in the PR.

@aaronfranke
Copy link
Member

aaronfranke commented Apr 10, 2024

I can confirm that this is not working. Specifically it is not able to find project.godot or project.binary inside the PCK.

Screenshot 2024-04-09 at 3 30 44 PM

pck-error

@hsandt
Copy link
Contributor

hsandt commented May 27, 2024

I got this issue while doing normal Exports (no separate pck export, and it should produce same pck as commented above anyway), but only when using certain names for folders and binary, such as: v4.2.1 - Dialogic project Linux build crash on start (compile error)/v4.2.1 - Dialogic project Linux build crash on start (compile error).x86_64 but not when I remove 1 character. Sometimes the error would occur anyway at first but not after exporting more files with different names in the same folder, making it very hard to grasp.

I checked the file commits for the fix but I don't see an obvious cause of how path usage affects the result. Should I just trust that this fix will also fix these particular export path naming?

In fact, I got a copy of Godot 4.3 dev 6 and just tried it, I cannot repro - but at the same time Godot 4.3 now generates fully hyphenated project path names by default for extra safety, so it's hard to tell.

I cannot switch version right now (middle of jam, need something stable), so I'll just avoid long export path names.

@TheWarmWaffle
Copy link

TheWarmWaffle commented Aug 20, 2024

I got this bug when compiling using target=template_debug on godot-4.4 windows, getting rid of that parameter generated a working godot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Immediate Blocker
Development

Successfully merging a pull request may close this issue.

8 participants