godot-ci icon indicating copy to clipboard operation
godot-ci copied to clipboard

Unable to load any resources (4.2.1)

Open Jodebu opened this issue 1 year ago • 11 comments

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

Jodebu avatar Dec 28 '23 19:12 Jodebu

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 avatar Jan 01 '24 17:01 Calinou

Judging from the CI log in the commit log, it looks like this is a regression from https://github.com/abarichello/godot-ci/pull/113. However, you're already using 4.2.1 in your CI manifest, so I don't know what's causing this.

Calinou avatar Jan 02 '24 20:01 Calinou

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

komdog avatar Jan 08 '24 21:01 komdog

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?

HunterNN avatar Jan 28 '24 16:01 HunterNN

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 :/

jeremyhcho avatar Feb 08 '24 07:02 jeremyhcho

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.

HonKLam avatar Feb 10 '24 22:02 HonKLam

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.

EvolHeartrise avatar Feb 25 '24 11:02 EvolHeartrise

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.

LocoNeko avatar Apr 15 '24 10:04 LocoNeko

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 }

Calinou avatar Apr 15 '24 20:04 Calinou

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.

LocoNeko avatar Apr 16 '24 12:04 LocoNeko