forge icon indicating copy to clipboard operation
forge copied to clipboard

When I modify the files in `app.aser.uppacked` dir, the file can't be loaded correctly

Open finscn opened this issue 11 months ago • 1 comments

Pre-flight checklist

  • [x] I have read the contribution documentation for this project.
  • [x] I agree to follow the code of conduct that this project uses.
  • [x] I have searched the issue tracker for a bug that matches the one I want to file, without success.

Forge version

7.7.0

Electron version

35.0.1

Operating system

macOS , windows 11

Last known working Forge version

No response

Expected behavior

I pack my app with this config:

    packagerConfig: {
        asar: {
            unpack: ['**/assets/**/*.@(png|jpg)']
        }
    },

I want to modify some images in 'app.asar.unpacked` dir , then open the app , It could use the new images.

Actual behavior

When I open the app , there is an error : WebGL: INVALID_VALUE: texSubImage2D: bad image data. I the new image smaller (bytes, not size) than old, it could work , if bigger , The error will happen.

I see the image in devtool, it's not be loaded correctly.

If I don't use asar , everything is ok .

Steps to reproduce

create a simple html page, it render a 3d object (with texture ) by webgl.

then pack it to an electron app by electron-forge, with :

    packagerConfig: {
        asar: {
            unpack: ['**/assets/**/*.@(png|jpg)']
        }
    },

then , change the 3d object's texture in 'app.asar.unpacked`, make the image is bigger .

The error will happen.

Additional information

No response

finscn avatar Mar 14 '25 12:03 finscn

can you please provide github repo of this

Sandeep-android-2000 avatar Apr 03 '25 12:04 Sandeep-android-2000