-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Positron breaks after sending multiple emails with SMTP #5686
Comments
Just in terms of your feeling that you have to reinstall Positron to get unstuck, if you have this problem again, here is a less draconian thing to try (just resetting Positron's state): https://positron.posit.co/troubleshooting.html#resetting-positron
The first removal resets Positron's state and that is what might help you recover, until we get a better handle on what's wrong. The second removal is about extensions and may not be necessary in your case. Now, I realize you're on Windows and those hints are for macOS. The relevant folders are below |
|
No, there's nothing unusual in my OS, is a simple install of Windows 11 Pro |
I agree with your hunch that it may not have anything to do with the specific R activity you're doing. So, going back to (#5563 (comment)), we will need to see some of your logs. https://positron.posit.co/troubleshooting.html#python-and-r-logs The ones that start with "R 4.4.2 ..." (or whatever specific version you're using) are likely to be the most informative. |
I've put all the logs above, it's missing only the R 4.2.2 kernel. I integrate with the kernel logs now: [R] 2024-12-12T08:51:27.118820Z ERROR Error receiving internal Help message: RecvError |
In the kernel log, I see an entry related to Help. Do you recall making any explicit move to access Help? |
Can you also tell me a bit more about your system? Specifically, which of these do you use to install Positron?
Is there anything interesting (as in constrained) about your permissions on this system? |
System details:
Positron and OS details:
Positron Version: 2024.12.0 (system setup) build 96
Code - OSS Version: 1.93.0
Commit: c5ce275
Date: 2024-11-28T02:50:45.229Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.26100
Interpreter details:
R 4.4.2
Describe the issue:
I was using the package blastula to render parametrized emails and send them with SMTP. The script use a
purrr::pwalk
call to a function defined as a formula similar to the followingon a tibble of just 5 rows. After sending the first 2 emails succesfully R crushes like this
The restarting button doesn't work. After closing and reopening Positron, it can't find any interpreter
Following the suggestion, on the dropdown menù on the top right it's visible an R interpreter but nothing happens when trying to click it. The only way i found to unstuck positron from this problem is by reinstalling it.
Steps to reproduce the issue:
It's difficult to define a step by step guide since the setting is very user-specific. I simply tried to render and send with SMTP some emails rendered with {blastula}. I'll leave an example code of what i have done
R script
Rmd file
title: "Title"
output: blastula::blastula_email
params:
parameter: NA
echo: false
warning: false
message: false
VERY IMPORTANT
Despite i can't give exact code to reproduce my environment, i think it might not be directly related to the task itself of sending emails with R. The problem I had is nearly identical to one I have reported a week or two ago right here #5563. The setting is completely different but the end result is completely identical. Last time i failed to give detailed log of what happened because the bug didn't occur anymore for some reason. This time i wanted to open a more complete issue on the bug in the hope to actually find a way to fix this bug.
Expected or desired behavior:
I would expect that R doesn't crush, because this would mean that i can't to this kind of "massive" email sending with Positron, a thing that i've already done easely with Rstudio. But beside that ,the very painful part is that i'm forced to reinstall Positron in order to be able to using it again.
Were there any error messages in the UI, Output panel, or Developer Tools console?
R logs
Console
2024-12-10 17:10:27.079 [debug] State: idle => busy (execute_request)
2024-12-10 17:10:44.106 [debug] State: busy => exited (child process exited)
2024-12-10 17:10:44.106 [info] Kernel exited with code 0; cleaning up.
2024-12-10 17:10:44.109 [info] Websocket closed with kernel in status exited: {}
Positron R Language Server
[Error - 5:10:43 PM] Client Positron R Language Server (4.4.2): connection to server is erroring.
read ECONNRESET
Shutting down server.
[Error - 5:10:43 PM] Client Positron R Language Server (4.4.2): connection to server is erroring.
read ECONNRESET
Shutting down server.
[Error - 5:10:43 PM] Client Positron R Language Server (4.4.2): connection to server is erroring.
Cannot call write after a stream was destroyed
Shutting down server.
[Error - 5:10:43 PM] Stopping server failed
Message: Cannot call write after a stream was destroyed
Code: -32099
[Error - 5:10:43 PM] Stopping server failed
Message: Cannot call write after a stream was destroyed
Code: -32099
[Error - 5:10:43 PM] Stopping server failed
Message: Cannot call write after a stream was destroyed
Code: -32099
[Error - 5:10:43 PM] Stopping server failed
Message: Cannot call write after a stream was destroyed
Code: -32099
Developer Tools
ERR [Extension Host] Sending request failed.
workbench.desktop.main.js:62543 [Extension Host] Sending request failed. (at console. (c:\Program Files\Positron\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:64217:26))
log @ workbench.desktop.main.js:62543
workbench.desktop.main.js:130821 DEBUG [Runtime startup] Saving workspace sessions (0)
workbench.desktop.main.js:62543 [Extension Host] rejected promise not handled within 1 second: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed (at console. (c:\Program Files\Positron\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:64217:26))
log @ workbench.desktop.main.js:62543
workbench.desktop.main.js:62543 [Extension Host] stack trace: Error: Cannot call write after a stream was destroyed
at _write (node:internal/streams/writable:483:11)
at Writable.write (node:internal/streams/writable:502:10)
at c:\Program Files\Positron\resources\app\extensions\positron-r\dist\extension.js:1:125041
at new Promise ()
at a.write (c:\Program Files\Positron\resources\app\extensions\positron-r\dist\extension.js:1:124959)
at y.doWrite (c:\Program Files\Positron\resources\app\extensions\positron-r\dist\extension.js:1:112577)
at c:\Program Files\Positron\resources\app\extensions\positron-r\dist\extension.js:1:112472 (at console. (c:\Program Files\Positron\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:64217:26))
log @ workbench.desktop.main.js:62543
workbench.desktop.main.js:507375 [positron.positron-r]Cannot call write after a stream was destroyed
$onExtensionRuntimeError @ workbench.desktop.main.js:507375
workbench.desktop.main.js:507376 Error: Cannot call write after a stream was destroyed
at _write (node:internal/streams/writable:483:11)
at Writable.write (node:internal/streams/writable:502:10)
at c:\Program Files\Positron\resources\app\extensions\positron-r\dist\extension.js:1:125041
at new Promise ()
at a.write (c:\Program Files\Positron\resources\app\extensions\positron-r\dist\extension.js:1:124959)
at y.doWrite (c:\Program Files\Positron\resources\app\extensions\positron-r\dist\extension.js:1:112577)
at c:\Program Files\Positron\resources\app\extensions\positron-r\dist\extension.js:1:112472
The text was updated successfully, but these errors were encountered: