Coder-Spirit / Jupyter-PHP

A PHP Kernel for Jupyter
MIT License
223 stars 33 forks source link

Fix `kernel_info_request` timeout #5

Closed castarco closed 7 years ago

castarco commented 8 years ago

Jupyter Notebook shows a timeout message every time a Jupyter-PHP kernel is started. The timeout is related with the kerne_info_request request. In theory, the kernel is responding with a kernel_info_reply message, but for some reason this message is not arriving to (or not being accepted by) the kernel.

EDIT: This also causes missing syntax highlighting because Jupyter does not receive the needed info to use it in Pygments.

yuvipanda commented 8 years ago

This also causes syntax highlighting and what not to not work in the notebook UI.

yuvipanda commented 8 years ago

I dug into this a little bit with tcpdump, I see the request but don't see us sending a response:

.0i1.0i1.~..{"msg_id": "0b7837ad-4a4b-46bf-a5c4-b1b605a23bd8", "parent_header": {"username": "username", "msg_id": "D4CD48B8ED374A07807A63FB993A2E33", "version": "5.0", "session": "20300F2B62CC4943BEAEB15226B904C8", "msg_type": "kernel_info_request"}, "msg_type": "status", "buffers": [], "metadata": {}, "header": {"date": "2016-04-02T11:54:17", "msg_id": "0b7837ad-4a4b-46bf-a5c4-b1b605a23bd8", "session": "0d44b952-999c-48a9-8789-0a5dcb27d2c8", "username": "kernel", "version": "5.0", "msg_type": "status"}, "content": {"execution_state": "idle"}, "channel": "iopub"}
yuvipanda commented 8 years ago

This is quite funky, because the logs from jupyter-php say they did send a response.

castarco commented 8 years ago

Hi @yuvipanda , yep, it was known that the syntax highlighting depends on the missing reply. I forgot to write that in this issue report, thank you for your comment.

I didn't check the network traffic with tcpdump, good idea. Probably this will help us to find the bug cause :) .

smasty commented 7 years ago

Any progress on this? It's a pain to use this without syntax highlighting...

castarco commented 7 years ago

@smasty Apparently solved, but syntax highlighting remains buggy.

bstoney commented 7 years ago

Syntax highlighting works if you start each code cell with //<? It looks like an issue with codemirror where it does not have a reference to the text/x-php mime type in meta.js, so will only use application/x-httpd-php. Still investigating