Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Uncaught Exception Error when sending beakermentions using sendWebmention messages #3

Open
sentamalin opened this issue Aug 6, 2020 · 3 comments

Comments

@sentamalin
Copy link
Owner

The actual sending of webmentions still works properly when done interactively (manually) with Beakermentions Endpoint with no uncaught exceptions. However, an Uncaught Exception is returned during the actual write process of the endpoint to the mention filestore, even if a 'success' message is sent back to the application as a response to the sendWebmention message.

With such a general error being given, I have no clue on where to start as to why it's causing errors even though it works interactively. My first guess would be a matter of Content Security Policy as it's running in an iframe. Yet, if that was the case, all code should be wonky...

@sentamalin
Copy link
Owner Author

Another issue of note is inside an <iframe> the endpoint doesn't advertise any joined peers or left peers, even though a minimized tab of the endpoint and opening the endpoint in a new tab advertise joined peers as expected. As I parse through more of the errors, my guess would be that the endpoint is unable to use some of the beaker API calls correctly.

@sentamalin
Copy link
Owner Author

sentamalin commented Aug 6, 2020

  • beaker.hyperdrive.readFile - Endpoint in <iframe> can read .webmention files and successfully checks if mentions exist before adding or deleting (when sending/deleting mentions) or just returning all mentions (when getting mentions)
  • beaker.hyperdrive.writeFile - Fails with an Uncaught Exception error; no other information is given in the console
  • beaker.peersockets - I don't know if anything's going on with it. No peers are being logged in the console as leaving or joining, even when peer join/leave events are logged in the console when an endpoint is opened in a new tab

Effectively, this means that Beakermentions can ask endpoints to get mentions, and can know if a mention will succeed, but no write operations can happen, and no peers are successfully asked.

@sentamalin
Copy link
Owner Author

Until this is resolved, using location search query strings can be used to provide sending functionality:

hyper://endpoint-hash/?source=${sourceURL}&target=${targetURL}&done=${appURL}

After Beakermentions writes the response and its requisite metadata, it will navigate to the endpoint to that URL. The endpoint will do its thing and send the user back to the URL supplied by done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant