Skip to content
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

Switch Smart Card Connector to Extensions Manifest V3 #1129

Open
emaxx-google opened this issue Feb 6, 2024 · 4 comments
Open

Switch Smart Card Connector to Extensions Manifest V3 #1129

emaxx-google opened this issue Feb 6, 2024 · 4 comments
Assignees

Comments

@emaxx-google
Copy link
Collaborator

Currently, Smart Card Connector is a Chrome App. A couple of years ago we started the work on migrating it an Extension (https://github.com/GoogleChromeLabs/chromeos_smart_card_connector/projects/3), however originally this was targeting Manifest V2 Extensions.

With the new deprecation timelines (https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline), we should switch to Extensions Manifest V3 instead.

@emaxx-google emaxx-google self-assigned this Feb 6, 2024
emaxx-google added a commit that referenced this issue Feb 6, 2024
When built in the (currently experimental) PACKAGING=extension mode,
Smart Card Connector's manifest.json will now use manifest_version=3.

The other parts of the file were edited in accordance to
backwards-incompatible manifest format changes.

This patch contributes to the effort tracked by #1129.
emaxx-google added a commit that referenced this issue Feb 18, 2024
When built in the (currently experimental) PACKAGING=extension mode,
Smart Card Connector's manifest.json will now use manifest_version=3.

The other parts of the file were edited in accordance to
backwards-incompatible manifest format changes.

This patch contributes to the effort tracked by #1129.
@Test18415
Copy link

Is it possible that this could this be an issue for us, considering the fact that we use a chrome kiosk app with manifest version 2 and also using smart card connector reader chrome app, or does this only apply for extension of smart card connector?

@emaxx-google
Copy link
Collaborator Author

Is it possible that this could this be an issue for us, considering the fact that we use a chrome kiosk app with manifest version 2 and also using smart card connector reader chrome app, or does this only apply for extension of smart card connector?

The latter is correct, so the timelines aren't pressuring as long as one stays on ChromeOS Apps.

@Test18415
Copy link

Okay, thank you, that is good news.

@emaxx-google emaxx-google added this to In progress in Extension migration May 21, 2024
@emaxx-google
Copy link
Collaborator Author

Capturing one thought: probably #1152 should be enhanced in a way similar to the code touched in #1155. In other words, when we await on an incoming port, the port should initially freeze incoming messages until it's marked as "ready". Otherwise we risk the following race condition:

  1. receiver: creates PortMessageChannelWaiter, and starts awaiting on it
  2. sender: port = chrome.runtime.connect(...)
  3. receiver: chrome.runtime.onConnect received by PortMessageChannelWaiter, and the Port is created
  4. receiver: the awaited promise starts being resolved
  5. sender: port.postMessage(...)
  6. receiver: the Port receives the message, and discards it because there's been no service registered for incoming messages yet
  7. receiver: the awaited promise gets resolved, and the code registers services, but the message that has been sent is already lost

So the fix would be to move the message handling to happen at a later step ("8") instead of step 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants