question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: getWasmTableEntry(...) is not a function

See original GitHub issue

🐛 Bug

pyodide.asm.js:10 Pyodide has suffered a fatal error. Please report this to the Pyodide maintainers.
pyodide.asm.js:10 The cause of the fatal error was:
pyodide.asm.js:10 TypeError: getWasmTableEntry(...) is not a function
    at invoke_ii (pyodide.asm.js:10:1544237)
    at 00bcba5a:0x54516
    at invoke_viiiiiiiiiiiiiii (pyodide.asm.js:10:1548668)
    at 00bcba5a:0x414a2
    at invoke_viii (pyodide.asm.js:10:1545014)
    at 00bcba5a:0x56286
    at method_call_trampoline (pyodide.asm.js:10:216572)
    at pyodide.asm.wasm:0x162162
    at method_call_trampoline (pyodide.asm.js:10:216572)
    at pyodide.asm.wasm:0x126317
API.fatal_error @ pyodide.asm.js:10
Module.callPyObjectKwargs @ pyodide.asm.js:10
Module.callPyObject @ pyodide.asm.js:10
apply @ pyodide.asm.js:10
apply @ pyodide.asm.js:10
runPython @ pyodide.asm.js:10
main @ (index):15
await in main (async)
(anonymous) @ (index):22
pyodide.asm.js:10 Stack (most recent call first):
pyodide.asm.js:10   File "<exec>", line 5 in <module>
pyodide.asm.js:10   File "/lib/python3.10/site-packages/_pyodide/_base.py", line 304 in run
pyodide.asm.js:10   File "/lib/python3.10/site-packages/_pyodide/_base.py", line 435 in eval_code
(index):21 Uncaught (in promise) TypeError: getWasmTableEntry(...) is not a function
    at invoke_ii (pyodide.asm.js:10:1544237)
    at 00bcba5a:0x54516
    at invoke_viiiiiiiiiiiiiii (pyodide.asm.js:10:1548668)
    at 00bcba5a:0x414a2
    at invoke_viii (pyodide.asm.js:10:1545014)
    at 00bcba5a:0x56286
    at method_call_trampoline (pyodide.asm.js:10:216572)
    at pyodide.asm.wasm:0x162162
    at method_call_trampoline (pyodide.asm.js:10:216572)
    at pyodide.asm.wasm:0x126317

To Reproduce

https://github.com/kitao/pyxel/tree/maturin

  • First install the maturin beta version: pip install -U --pre maturin
  • Build with maturin: RUSTUP_TOOLCHAIN=nightly maturin build -o dist --release --target wasm32-unknown-emscripten
  • Run ./scripts/start_server and open http://localhost:8000 in browser, see the error in console.

Expected behavior

No TypeError: getWasmTableEntry(...) is not a function in console.

Environment

  • Pyodide Version: 0.21.0
  • Browser version: 104.0.5112.79
  • Any other relevant information:

Additional context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
km19809commented, Aug 15, 2022

I rebuilt pyodide with -sUSE_SDL=2, then the message changed: image

I assumed this is related to a canvas issue(https://github.com/emscripten-ports/SDL2/issues/130), so I added a blank canvas with id “canvas”:

<!-- Bootstrap HTML for running the unit tests. -->
<!DOCTYPE html>
<html>
  <head>
    <title>pyodide</title>
    <script src="./pyodide.js"></script>
  </head>
  <body>
    <canvas id="canvas"></canvas>
    <script type="text/javascript">
      async function main(){
        const pyodide = await loadPyodide();
        await pyodide.loadPackage("micropip")
        const micropip = pyodide.pyimport("micropip")
        await micropip.install("pyxel-1.8.0-cp37-abi3-emscripten_3_1_14_wasm32.whl")
        await pyodide.runPython(`
                import pyxel
                pyxel.init(600,480)
        `)
      }
      main()
    </script>
  </body>
</html>

Then the error changed: image

Although it crashes, the initial linking issue seems to be resolved.

0reactions
km19809commented, Aug 15, 2022

I think setting -sGL_WORKAROUND_SAFARI_GETCONTEXT_BUG=0 would fix the most recent error.

You may also want -sMAX_WEBGL_VERSION=2.

This resolved SafariWebGL2 issue. (It still crashes though 😂) Thank you a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting a "not a function" error when trying to create a Signin ...
When looking through the terminal, this is the error that I get on the log. (node:13688) UnhandledPromiseRejectionWarning: TypeError: (0 , _util ...
Read more >
Interacting with code — Emscripten 3.1.26-git (dev ...
The first parameter is the name of the function to be wrapped, the second is the return type of the function (or a...
Read more >
C/C++语言转WebAssembly篇(一) - CSDN博客
There are various ways Module can be used: // 1. Not defined. We create it here // 2. A function parameter, function(Module) {...
Read more >
emcc wasm 빌드 - 구차니의 잡동사니 모음
A function parameter, function(Module) { ..generated code. ... function() { abort("'getWasmTableEntry' was not exported. add it to ...
Read more >
CoCalc -- ChangeLog.md
The getWasmTableEntry/setWasmTableEntry library function are no longer ... bug on WebKit "pauseWebAudio failed: TypeError: Not enough arguments" (#3861).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found