sentamalin / beakermentions

Read and send responses on what you're currently viewing on Beaker Browser.
hyper://977da6c3040f711508fe246a22b1a1ddd5b716b16dc9ad2a744383d91d52b63a/
Creative Commons Zero v1.0 Universal
4 stars 0 forks source link

Uncaught Exception Error when sending beakermentions using `sendWebmention` messages #3

Open sentamalin opened 4 years ago

sentamalin commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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.