dat-fox
dat-fox copied to clipboard
Getting an `window.DatArchive.load is not a function` Error
I’m running Firefox 69.0 (64-bit) with an up-to-date version of the Add-on. When visiting my app on localhost:3000
I’m getting the error message window.DatArchive.load is not a function
. (I tried running the app on a different port, didn’t change anything.)
The window.DatArchive
exists and some of my functionality worked until I got to the page that uses the .load
method. I should note that the app runs properly in the Beaker browser.
The setup page says everything is working fine:
Checking helper connection
Successfully started dat gateway at localhost:3016.
Helper version 0.1.0 up-to-date
I even tried setting the Dat gateway Address
to localhost:3016
since 3000
seems to be the default.
Visiting or trying to do a cURL on this port returns the message: TypeError: Cannot read property 'replace' of null
Let me know if there’s any other information I could provide.
Looks like we're missing the DatArchive.load
method in this file: https://github.com/sammacbeth/dat-fox/blob/master/common/dat-archive-rpc.js
I think this was a later addition to the API that I missed when creating this implementation.
Seems like you’ve implemented it in dat-fox-helper
: https://github.com/sammacbeth/dat-fox-helper/blob/master/src/api.js#L83
This should be implemented on the helper side, so just needs the function to be added here: https://github.com/sammacbeth/dat-fox/blob/master/common/dat-archive-rpc.js