Leonard Wagner created GUACAMOLE-1793: -----------------------------------------
Summary: "Error: blob is undefined" when creating new SessionRecording from Blob Key: GUACAMOLE-1793 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1793 Project: Guacamole Issue Type: Bug Components: guacamole-common-js Affects Versions: 1.5.1 Reporter: Leonard Wagner When creating a {{Guacamole.SessionRecording}} instance by supplying a blob an error is thrown. To reproduce this, run the following test: {code:javascript} describe("Guacamole.SessionRecording", function EventSpec() { it("should create new SessionRecording instance from Blob", async function () { const url = 'https://raw.githubusercontent.com/apache/' + 'guacamole-client/master/doc/guacamole-playback-example/src/main/webapp/recording.guac'; const response = await fetch(url); const blob = await response.blob(); const recording = new Guacamole.SessionRecording(blob); expect(recording).not.toBeNull(); }); }); {code} Expected result: The test passes without an error. Actual behavior: An error is thrown when calling the constructor function. {code:java} TypeError: blob is undefined in src/main/webapp/modules/SessionRecording.js (line 280) readNextBlock@src/main/webapp/modules/SessionRecording.js:280:17 parseBlob@src/main/webapp/modules/SessionRecording.js:296:9 SessionRecording@src/main/webapp/modules/SessionRecording.js:403:18 EventSpec/<@src/test/javascript/Recording.js:26:27 {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)