Worked once, new cell doesn't, then cell 0 won't run anymore...
kitplummer opened this issue · 8 comments
...and now I can't get it to work at all. Feels like a cache problem. No errors in the log (server or client-side). Restarting the server doesn't do anything either.
I've enabled debug
log hoping to maybe see something on the Phoenix.LiveView.Socket but nothing other than the CONNECTED
message.
I've gotta be doing something stupid right? :D. Tried different browsers same behavior in all of them. Debugging tip? The websocket connection is made, but then nothing after that:
11:17:03.257 [info] Running NiexWeb.Endpoint with cowboy 2.8.0 at 0.0.0.0:4000 (http)
11:17:03.257 [info] Access NiexWeb.Endpoint at http://localhost:4000
webpack is watching the files…
[hardsource:e182d17b] Using 4 MB of disk space.
[hardsource:e182d17b] Tracking node dependencies with: yarn.lock.
[hardsource:e182d17b] Node dependencies changed. Building new cache.
Hash: 20f4f36444ab89b54d8a
Version: webpack 4.41.5
Time: 1594ms
Built at: 12/30/2020 11:17:05 AM
Asset Size Chunks Chunk Names
../css/app.css 17.2 KiB app [emitted] app
../favicon.ico 1.23 KiB [emitted]
../images/phoenix.png 13.6 KiB [emitted]
../robots.txt 202 bytes [emitted]
app.js 5.13 MiB app [emitted] app
Entrypoint app = ../css/app.css app.js
[0] multi ./js/app.js 28 bytes {app} [built]
[./css/app.scss] 39 bytes {app} [built]
[./js/app.js] 1.41 KiB {app} [built]
[./js/niex.js] 1.97 KiB {app} [built]
[./node_modules/moment/locale sync recursive ^\.\/.*$] ./node_modules/moment/locale sync ^\.\/.*$ 3.21 KiB {app} [optional] [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {app} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {app} [built]
+ 150 hidden modules
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/sass-loader/dist/cjs.js!css/app.scss:
Entrypoint mini-css-extract-plugin = *
[./node_modules/css-loader/dist/cjs.js!./css/phoenix.css] 10.4 KiB {mini-css-extract-plugin} [built]
[./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./css/app.scss] 6.49 KiB {mini-css-extract-plugin} [built]
+ 2 hidden modules
11:17:05.978 [debug] Live reload: priv/static/css/app.css
11:17:05.979 [debug] Live reload: priv/static/images/phoenix.png
11:17:05.979 [debug] Live reload: priv/static/js/app.js
11:17:06.146 request_id=FlWKxkyCdKCjFO0AAITm [info] GET /
11:17:06.147 request_id=FlWKxkyCdKCjFO0AAITm [debug] Processing with Phoenix.LiveView.Plug.index/2
Parameters: %{}
Pipelines: [:browser]
11:17:06.157 request_id=FlWKxkyCdKCjFO0AAITm [info] Sent 200 in 10ms
11:17:08.627 [info] CONNECTED TO Phoenix.LiveView.Socket in 188µs
Transport: :websocket
Serializer: Phoenix.Socket.V2.JSONSerializer
Parameters: %{"_csrf_token" => "QWs8HABPFh4hLy8KNxgXBWwWFGBQFxxl6YxrnyxixyaNDKTi8Ww9bgES", "_mounts" => "0", "_track_static" => %{"0" => "http://localhost:4000/css/app.css", "1" => "http://localhost:4000/js/app.js"}, "vsn" => "2.0.0"}
Any ideas?
Can you clarify "doesn't work"? Like, hitting the "run" button doesn't do anything?
Please provide browser/OS and any additional details so I can investigate.
To debug, you could break or log on handle_event("execute-cell", %{"ref" => id}, socket)
(in page_live.ex
)
When clicking the "run" or "delete" icon, nothing happens. Nothing in browser, and nothing is logged from the server.
On macOS (Big Sur), with Chrome, Firefox and Safari.
➜ niex git:(master) ✗ elixir --version
Erlang/OTP 23 [erts-11.0.3] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1] [hipe]
Elixir 1.10.4 (compiled with Erlang/OTP 23)
I've verified other events work as expected, e.g., focus-cell
and update-content
.
After some testing, I can reproduce something similar with code in the textarea that extends the full width of the view - looks like the textarea click is conflicting with the button click. Can you confirm this is the issue you're seeing by trying with shorter code (the default IO.inspect("hello")
works fine, for example)?
Hrm, that doesn't work either.
@kitplummer I think I've found the issue - can you try the branch https://github.com/jonklein/niex/tree/fix/cell_blur . In short, there's a race condition with the button clicking and the cell blurring which removes the button - it should be fixed in that branch.
Yep, that's working.
Great - I will get that merged and close this out. Thanks for reporting it!
Fixed and merged to master.