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

Unable to load any resources (4.2.1) #127

Open
Jodebu opened this issue Dec 28, 2023 · 10 comments
Open

Unable to load any resources (4.2.1) #127

Jodebu opened this issue Dec 28, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@Jodebu
Copy link

Jodebu commented Dec 28, 2023

When exporting, the engine is not able to find any of the resources of the project,
The binaries will build, but they will be completely broken when you try to execute them. This issue does not appear on local.

The only thing I can think of is that the .godot/imported/ folder is not being generated on the expected place, but I am really not sure. Could you please provide where is it supposed to be?

Here is my YAML file:

name: "Build and export"
on: 
  push:
    branches:
      - main
      - develop

env:
  GODOT_VERSION: 4.2.1
  EXPORT_NAME: OBMar
  PROJECT_PATH: .
  EXPORT_TYPE: ${{ github.ref_name == 'main' && 'release' || 'debug'}}

jobs:
  export:
    name: Export
    runs-on: ubuntu-20.04
    container:
      image: barichello/godot-ci:4.2.1
    strategy: 
      matrix:
        include:
          - os: "windows"
            name: "Windows Desktop"
            extension: "exe"
          - os: "linux"
            name: "Linux/X11"
            extension: "x86_64"
          - os: "mac"
            name: "Mac OSX"
            extension: "zip"
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          lfs: true
      - name: Setup
        run: |
          mkdir -v -p ~/.local/share/godot/export_templates
          mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
      - name: Build
        run: |
          mkdir -v -p build/${{ matrix.os }}
          cd $PROJECT_PATH
          godot --headless --verbose --export-${EXPORT_TYPE} "${{ matrix.name }}" build/${{ matrix.os }}/$EXPORT_NAME.${{ matrix.extension }}
      - name: Upload Artifact
        uses: actions/upload-artifact@v1
        with:
          name: ${{ matrix.os }}
          path: build/${{ matrix.os }}

And here is an extract from one of the jobs:
imagen

Thank you very much in advance

@Calinou
Copy link
Collaborator

Calinou commented Jan 1, 2024

The GDExtension library error message implies you're using Windows runners to export the project, which sounds unexpected.

Can you reproduce this if you remove the Git plugin from the project files then commit changes?

@Calinou Calinou added the bug Something isn't working label Jan 1, 2024
@Calinou
Copy link
Collaborator

Calinou commented Jan 2, 2024

Judging from the CI log in the commit log, it looks like this is a regression from #113. However, you're already using 4.2.1 in your CI manifest, so I don't know what's causing this.

@komdog
Copy link

komdog commented Jan 8, 2024

I'm having the same issue; it won't import any of my assets, and my classes with static variables and functions aren't recognized either.

image

image

Save.gd is a standalone script with a few static functions and variables. that are being called / reference by an autoload singleton called SceneManager

@HunterNN
Copy link
Contributor

We're encountering a similar issue. When we started our CI workflow with Godot 4.2.1, we thought that manually starting Godot once was necessary to generate the '.godot' folder. We used the following command as a workaround:
godot --project . --headless --quit-after 200 -e 2>/dev/null

However, we later encountered another issue where our shader did not work on web export due to problems with the '.godot' folder. Upon reviewing example repositories, we realized that this initial step should not be necessary at all. It seems that the '.godot' folder should also be generated when running godot --headless --export-release ... (?).
Could this be a bug in Godot itself?

@jeremyhcho
Copy link

I can't seem to get this to work with 4.2.1 on Linux. The general workaround that I've been reading around this has been to run something like timeout 20s godot --headless --editor and then run Godot with --export-release but nothing I do gets the .godot/imported folder to generate.

I've gotten the workaround to behave as expected on a Windows machine :/

@HonKLam
Copy link

HonKLam commented Feb 10, 2024

Not sure if it will help anyone, but I encountered this problem as well and just disabled all plugins / remove all plugins I was using in the project (it wasn't many) and after that I didn't get this error anymore.

Maybe it was just coincidence and it magically worked after a couple of trial and errors, but thought I might just get this one out there.

@EvolHeartrise
Copy link

Not sure if it will help anyone, but I encountered this problem as well and just disabled all plugins / remove all plugins I was using in the project (it wasn't many) and after that I didn't get this error anymore.

Maybe it was just coincidence and it magically worked after a couple of trial and errors, but thought I might just get this one out there.

Can also confirm, I have two projects in 4.2.1, one with addons/plugins, and one without. The one without had no issues at all, but the one with addons/plugins errored out.

@LocoNeko
Copy link

This is affecting me as well. Godot 4.2.1 on Linux, one add-on (Terrain 3D), and I get the Script Error / Parse Error.
I can confirm my projects exports properly on my local machine using godot --headless.

@Calinou
Copy link
Collaborator

Calinou commented Apr 15, 2024

Does it work if you use this instead? The first command imports resources, the second one exports the project with resources already imported beforehand:

godot --headless --verbose --editor --quit-after 10
godot --headless --verbose --export-${EXPORT_TYPE} "${{ matrix.name }}" build/${{ matrix.os }}/$EXPORT_NAME.${{ matrix.extension }

@LocoNeko
Copy link

LocoNeko commented Apr 16, 2024

Does it work if you use this instead? The first command imports resources, the second one exports the project with resources already imported beforehand:

godot --headless --verbose --editor --quit-after 10
godot --headless --verbose --export-${EXPORT_TYPE} "${{ matrix.name }}" build/${{ matrix.os }}/$EXPORT_NAME.${{ matrix.extension }

No, I got the same error. This, however, works without any issues from the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants