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

Getting an window.DatArchive.load is not a function Error #37

Open
filipdanic opened this issue Sep 17, 2019 · 3 comments
Open

Getting an window.DatArchive.load is not a function Error #37

filipdanic opened this issue Sep 17, 2019 · 3 comments
Labels
good first issue Good for newcomers

Comments

@filipdanic
Copy link

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.

@sammacbeth
Copy link
Owner

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.

@filipdanic
Copy link
Author

Seems like you’ve implemented it in dat-fox-helper: https://github.com/sammacbeth/dat-fox-helper/blob/master/src/api.js#L83

@sammacbeth
Copy link
Owner

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

@sammacbeth sammacbeth added the good first issue Good for newcomers label Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants