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

[Unity] Bug: 在打包webGL时报错[parse exception: attempted pop from empty stack / beyond block start boundary at 28006177 (at 0:28006177)] #1894

Open
3 tasks done
Shadow-Fy opened this issue Nov 4, 2024 · 1 comment
Assignees
Labels
bug Something isn't working Unity

Comments

@Shadow-Fy
Copy link

Shadow-Fy commented Nov 4, 2024

前置阅读 | Pre-reading

Puer的版本 | Puer Version

2.0.5

Unity的版本 | Unity Version

2022.3.51f1

发生在哪个平台 | Platform

Editor(win)

错误信息 | Error Message

Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
[parse exception: attempted pop from empty stack / beyond block start boundary at 28006177 (at 0:28006177)]
Fatal: error in parsing input
emcc: error: 'D:/Unity/UnityEditor/2022.3.51f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/binaryen\bin\wasm-emscripten-finalize Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.wasm -o Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.wasm --detect-features' failed (returned 1)

UnityEditor.GenericMenu:CatchMenu (object,string[],int)


Build completed with a result of 'Failed' in 1005 seconds (1004646 ms)
Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
[parse exception: attempted pop from empty stack / beyond block start boundary at 28006177 (at 0:28006177)]
Fatal: error in parsing input
emcc: error: 'D:/Unity/UnityEditor/2022.3.51f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/binaryen\bin\wasm-emscripten-finalize Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.wasm -o Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.wasm --detect-features' failed (returned 1)

UnityEditor.GenericMenu:CatchMenu (object,string[],int)

image
image

问题重现 | Bug reproduce

我的项目目前没有任何报错情况,并且能够正常打包windows以及android,但是在尝试打包webGL格式时就出现了这个 BUG

@Shadow-Fy Shadow-Fy added bug Something isn't working Unity labels Nov 4, 2024
@Shadow-Fy
Copy link
Author

Shadow-Fy commented Nov 5, 2024

尝试将puerts升级到2.1.0版本后解决了这个问题,但是在点击 PuerTS/WebGL/build puerts-js for browser 时出现了一个报错不知道应该如何解决这个问题,同时还有两个其他报错一直在出现,但是我感觉不会影响到项目所以没有管,不确定这个报错是否有影响

Exception: undefined:0: ReferenceError: require is not defined

ReferenceError: require is not defined
at chunk:2:13
Puerts.GenericDelegate.Action[T1] (T1 p1) (at ./Library/PackageCache/com.tencent.puerts.core@2.1.0/Runtime/Src/Default/JSType/GenericDelegate.cs:467)
WebGLPuertsPostProcessor.run (System.String runEntry, System.String lastBuiltPath) (at D:/pacificx/packages/webgl-jsbuild/upm/Editor/WebGLPostProcessor.cs:52)
WebGLPuertsPostProcessor.browser () (at D:/pacificx/packages/webgl-jsbuild/upm/Editor/WebGLPostProcessor.cs:98)

image

image

image

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

No branches or pull requests

2 participants