In this update
Welcome to the May 2023 edition of “What’s New in RokuCommunity.” Please consider subscribing to stay up to date with what’s happening in RokuCommunity.
This month we fixed that pesky EXIST: file already exists, mkdir...
error that was crashing debug sessions, added node.js v19 compatibility for roku-deploy, several quality of life fixes for various RokuCommunity projects, and more.
We’ve also added a new section to this writeup, called Issue of the month. Check it out!
The RokuCommunity projects are maintained by a relatively small group of developers (mostly volunteers), and we have a growing list of of unresolved issues. We need your help! There are many different ways you can contribute. Whether it’s addressing bugs, improving documentation, introducing new features, or simply helping us manage our expanding list of GitHub issues, your involvement would be greatly appreciated. We are more than happy to guide you in finding the most suitable contribution method that aligns with your interests. To learn more about how you can contribute, feel free to reach out to us on Slack, or explore the existing GitHub issues:
In this section, we highlight a specific issue where we could benefit from the community’s assistance in finding a solution. These problems are generally straightforward to address, and serve as an excellent opportunity to become acquainted with the RokuCommunity codebases.
This month, we’d like to draw attention to vscode-brightscript-language#437: Add button to copy device IP.
The Devices
panel shows many different fields from the device-info
ECP request. Clicking on any of these items will automatically copy the value to your clipboard, which is super helpful. However, one exception is the IP address
entry, which when clicked will open the Roku developer upload form instead of copying the IP address to your clipboard. We’d like to update that functionality so that clicking the IP address copies the value to your clipboard, and there would be a secondary link or button that opens the developer portal.
If you’re interested in working on this feature, please comment on the pull request or reach out to us on Slack
<
and >
We fixed a syntax highlighting issue in BrightScript/BrighterScript files where the <
and >
symbols were red, due to being marked as “unclosed brackets”. We’ve removed them from the bracket matching logic so they should now be highlighted the same as other logical operators.
Before:
After:
file already exists
crash when starting debug sessionsWe fixed a critical debugger issue that would show an error EXIST: file already exists, mkdir...
anytime you ran a debug session, requiring require a full system restart or force-quitting many of the vscode processes. The problem was introduced
in v0.18.7 when we improved the error messaging around certain types of debug session failures (ironic, right?).
The actual problem is that the .shutdown()
call in the debug session fell into an infinite async loop, causing the stagingDir to be regularly locked by the OS as we repeatedly tried to empty its contents. To solve this, we now guard the .shutdown()
call in a promise semaphore so we can only run shutdown once, the first time called. See #152 for more information.
hitCount
math fixWe fixed a math error in the hitCount
counter in the top-level groups of the Rendezvous panel of the vscode extension. That number should now properly match the sum of all the child hit counts!
We’ve fixed a bug that could sometimes cause infinite recursion when using the Scenegraph Inspector. See vscode-brightscript-language#480 for more details. There’s not really anything to show, so here’s a photo of the SceneGraph Inspector just for fun.
Whenever you encounter a runtime crash during a debug session, the device often will include a hexadecimal error code (such as &h08
). These error codes are not overly helpful at a glance unless you’ve memorized all of Roku’s error codes. To improve readability of these crashlogs, the BrightScript Language extension for vscode now augments those hex codes with more useful error information.
Before:
Syntax Error. (compile error &h02) in pkg:/source/main.brs(3)
After:
Syntax Error. (compile error &h02 (ERR_SYNTAX): syntax error ) in pkg:/source/main.brs(3)
Many new commands have been added to the Roku Commands panel in the vscode extension. We won’t get into listing them all here, but if you’re a regular user of this feature then you’ll appreciate these new commands! Here’s a screenshot of that Roku Commands panel in vscode.
findChild
and findAncestor
We have improved the AstNode
methods findChild
and findAncestor
methods to support:
externally cancelling the walk. If possible, you should consider cancelling the walk once you find the node you’re looking for, as this will improve performance by skipping wasted walking
enabling findAncestor to return a different node than matched, if the matcher returns the node
You can now use roku-deploy on Node.js v19 and above! The core issue was caused by Node.js 19 changing the default keepalive settings on its internal http library. As such, roku-deploy on node 19 would fail with an ECONNRESET
error. The fix was to pass in an additional argument to the postman-request agentOptions
.
request
, hello postman-request
For several years the RokuCommunity tools like roku-deploy and roku-debug have been using the request library for our http request needs. However, the request package was deprecated in 2019 and has started triggering all sorts of npm audit issues. Since the request
package still perfectly suits our needs, we’ve migrated to a fork of the project called postman-request which is actively maintained.
On a related note, a few recent pull requests had added a dependency on axios. In order to keep our projects smaller, we’ve removed that dependency in favor of leveraging postman-request in those situations as well.
None of these changes should have any impact on your direct use of the tools, but if you have Node.js scripts or BrighterScript plugins that utilize request as a transient dependency from our tools, you’ll now need to install request
directly or change to importing postman-request instead, as request will no longer be present in node_modules.
If you’ve contributed to roku-deploy in the past, you might have noticed that some of the device tests were failing. This was because we had accidentally replaced our signingPackage.pkg
with an empty file (oops!). Turns out one of our unit tests was using the wrong directory and was replacing the file on every test suite run. That’s been fixed and the correct signingPackage.pkg
file has been restored, so those device tests should now work properly moving forward.
Last but certainly not least, a big Thank You to the following people who contributed this month:
Contributions to vscode-brightscript-language:
Contributions to brighterscript:
Contributions to roku-deploy:
Contributions to logger:
Contributions to roku-debug:
Legal notice
The views and opinions expressed in this website and all of its pages are those from within our open source community and do not represent the views or positions of Roku, Inc. or any entities they represent.
Designed with @arturocuya, powered by Astro
by