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

Webcam and toolbar not injected to other tabs when switching tabs. #223

Closed
adriennhem opened this issue Mar 21, 2024 · 2 comments
Closed

Comments

@adriennhem
Copy link

When switching tabs I am getting the following error:

Error in event handler: TypeError: Cannot read properties of undefined (reading 'id')
at chrome-extension://kbbdabhdfibnancpjfhlkhafgdilcnji/contentScript.bundle.js:66:153485

This seems to be preventing the injection of the toolbar and camera. If I refresh the tab I switched to then it will inject the camera and the toolbar.

@adriennhem
Copy link
Author

So I found the issue, it's in the ContentState.jsx file. It's using sender.tab.id instead of sender.id

 } else if (request.type === "recording-check") {
        if (!request.force) {
          if (!contentStateRef.showExtension && !contentStateRef.recording) {
            // use sender.id instead of sender.tab.id
            updateFromStorage(true, sender.id);
          }
        } else if (request.force) {
          setContentState((prevContentState) => ({
            ...prevContentState,
            showExtension: true,
            recording: true,
          }));
          //checkRecording(sender.tab.id);
          // use sender.id instead of sender.tab.id
          updateFromStorage(false, sender.id);
        
      }
      } else if (request.type === "stop-pending") {
        setContentState((prevContentState) => ({
          ...prevContentState,
          pendingRecording: false,
        }));
      }
    },
    [contentStateRef.current, contentState]

@alyssaxuu
Copy link
Owner

Fixed in the latest release, it should go live in the Chrome Store soon!

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

No branches or pull requests

2 participants