microsoft / microsoft/pxt-microbit

Console error reported for serial_redirect

Open
#6,622 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2
Dominant language
TypeScript
Stars
804
Forks
721
Avg merge
2d 9h
Merged PRs (30d)
2

Description

Describe the bug

In a new project, the first opening of the Serial toolbox panel triggers a browser console error

I think this may be because the rate parameter description "e.g." is picked up as a default value

https://github.com/microsoft/pxt-microbit/blob/ee22e9919b81d243a7e47f9d31349846e38a27e5/libs/core/serial.cpp#L161

https://github.com/microsoft/pxt-microbit/blob/ee22e9919b81d243a7e47f9d31349846e38a27e5/libs/core/shims.d.ts#L1068

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://makecode.microbit.org/
  2. Create a new project and open the browser console
  3. Open the Serial toolbox panel
  4. See error

Expected behavior
A correct default value is specified

Screenshots

Image

micro:bit version (please complete the following information):
not hardware related

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect libs/core/serial.cpp around line 161 and libs/core/shims.d.ts around line 1068, then reproduce the issue by opening the Serial toolbox in a new project with the browser console open. Confirm the parameter metadata produces the reported console error, and consider the work complete when a correct default value is specified and the error no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
frontend, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.