File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -146,23 +146,28 @@ export function createJupyterConnectionInfo(
146
146
const serializer : import ( '@jupyterlab/services' ) . ServerConnection . ISettings [ 'serializer' ] = {
147
147
deserialize : ( data : ArrayBuffer , protocol ?: string ) => {
148
148
try {
149
+ if ( typeof data === 'string' ) {
150
+ return deserialize ( data , '' ) ;
151
+ }
149
152
return deserialize ( data , protocol ) ;
150
153
} catch ( ex ) {
154
+ logger . warn ( `Failed to deserialize message protocol = ${ protocol } ` , ex ) ;
151
155
if ( protocol ) {
152
- return deserialize ( data , '' ) ;
153
- } else {
154
156
return deserialize ( data , supportedKernelWebSocketProtocols . v1KernelWebsocketJupyterOrg ) ;
157
+ } else {
158
+ return deserialize ( data , '' ) ;
155
159
}
156
160
}
157
161
} ,
158
162
serialize : ( msg : KernelMessage . IMessage , protocol ?: string ) => {
159
163
try {
160
164
return serialize ( msg , protocol ) ;
161
165
} catch ( ex ) {
166
+ logger . warn ( `Failed to serialize message protocol = ${ protocol } ` , ex ) ;
162
167
if ( protocol ) {
163
- return serialize ( msg , '' ) ;
164
- } else {
165
168
return serialize ( msg , supportedKernelWebSocketProtocols . v1KernelWebsocketJupyterOrg ) ;
169
+ } else {
170
+ return serialize ( msg , '' ) ;
166
171
}
167
172
}
168
173
}
You can’t perform that action at this time.
0 commit comments