Open sentamalin opened 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.
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 consolebeaker.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 tabEffectively, 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.
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
.
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...