Three.js: this.payloadHandler.handlePayload is not a function

Created on 19 Aug 2020  路  7Comments  路  Source: mrdoob/three.js

Description of the problem

When loading a .obj file with OBJLoader2Parallel, an uncaught TypeError is thrown.

Uncaught TypeError: this.payloadHandler.handlePayload is not a function
    processMessage WorkerRunner.js:156
    scopedRunner WorkerRunner.js:137
    WorkerRunner WorkerRunner.js:141
    buildWorkerCode OBJLoader2Parallel.js:115
    parse OBJLoader2Parallel.js:176
    fileLoaderOnLoad OBJLoader2.js:303
    load three.module.js:36370
    load three.module.js:36348
    load OBJLoader2.js:310
    load OBJLoader2Parallel.js:154

The environment is created by create-react-app's dev command (no minificaton) but I suspect it would appear in the prod build as well. I believe this is directly related to https://github.com/mrdoob/three.js/pull/18356. Perhaps the issue wasn't fully fixed despite my telling @kaisalmen that it was.

Three.js version
  • r117.1 (I'm locked to this currently)
  • presumably latest as well since changelogs don't reflect anything that would impact this but I will verify if I get time.
  • [email protected]
  • [email protected]
Browser
  • [ ] All of them
  • [ ] Chrome
  • [x] Firefox
  • [ ] Internet Explorer
OS
  • [ ] All of them
  • [x] Windows
  • [ ] macOS
  • [ ] Linux
  • [ ] Android
  • [ ] iOS
Loaders

All 7 comments

Ok, I will see if this observation applies and this reproduction approach still works: https://github.com/mrdoob/three.js/pull/18356#issuecomment-596126335

As soon as the TaskManager is ready the whole WorkerRunner/CodeSerializer is gone. Worker code creation is simplified, I hope that this will eliminate such problems we see here in the future (and introduce new ones, haha)

I've re-created a test repo here https://github.com/geoff-harper/cra-objloader. I'm seeing it on the dev env in Chrome and Firefox now

I have the impression we are chasing ghosts.

I was only able to reproduce the issue only with Chrome 85.0.4183.102 and only when reloading, but not with Chrome 87.0.4259.3, nor with Edge 85.0.564.51 and also not with Firefox 80.0.1. This was all tested on Windows 10 (64-Bit) + WSL2 (Ubuntu 20.04).

When I disabled all extensions with "Disable Extensions Temporarily" extension in Chrome the problem did no longer occur. The other browsers either had no extensions installed or the problem did just not occur. The results are the same in dev and production environments.

I had a similar issue in a different context, but with a matching error pattern a couple of months ago.

I can confirm that error is persisting on Chrome 85.0.4183.102 w/ extensions as well as in incognito. For whatever reason Chrome doesn't grab versions past that so I can't test 87. With Firefox 80.0.1, it works incognito but errors in regular. Works in chromium Edge on all accounts so presumably later Chrome versions (and Opera? lol) are fine.

As far as I can tell the model is in fact loaded fine even with the error present. If some upcoming changes are in fact deprecating this code then I can simply swallow the error until then and hopefully get off of r117

Thanks for your help

As far as I can tell the model is in fact loaded fine even with the error present. If some upcoming changes are in fact deprecating this code then I can simply swallow the error until then and hopefully get off of r117

The model was loaded every time. Honestly, I don't really understand why the error shows up in some cases. If you observe it beyond R117 and Chromium based browser 85+, please let me know.

@Mugen87 shall we close this and re-open if it is re-observed or do you prefer to leave it open? Thanks.

shall we close this and re-open if it is re-observed

馃憤

Was this page helpful?
0 / 5 - 0 ratings