Welcome, Guest

Author Topic: Hummgingbird Preact Errors  (Read 42 times)


  • Posts: 1
    • View Profile
Hummgingbird Preact Errors
« on: October 10, 2018, 11:31:38 PM »

I just started playing with a trial version of Hummingbird ( and wanted to try out preact with it. I followed the documentation on how to set it up and created a template project with the default project.
after building it, it seems to work but a couple of errors are thrown (using it with Unity3d 2018.1.9f)

most prominently a "document.write is not a function" JS Error.
When clicking on one of the links/buttons in the template it throws additional "ArgumentOutOfRangeException: Argument is out of range.
Parameter name: startIndex" Errors.

Any idea what's going on there?


  • Administrator
  • *****
  • Posts: 76
    • View Profile
Re: Hummgingbird Preact Errors
« Reply #1 on: October 11, 2018, 04:57:00 AM »
Hi lukas,

Generally, document.write is used in Preact projects to add polyfills for fetch and Promise. As this function is currently not supported, you can:

- safely remove the document.write statements if you don't want to use the polyfills for  fetch and Promise


- add <script src="<polyfills.js>"> to the html if you want to use such.

On the other hand, the error in the template (ArgumentOutOfRangeException) is caused by the loading mechanism of preact-router. Loading the page through the coui:// protocol instead resolves the error.

Hope this helps! Please, feel free to reach us directly at support@coherent-labs.com if you have any other questions.

John V,
Support Engineer at Coherent Labs
« Last Edit: October 11, 2018, 05:02:49 AM by john.v »