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

[BUG] Vite and Vue - Device.prototype.connect isn't invoked. #52

Closed
4 tasks done
dziardziel-acaisoft opened this issue Dec 7, 2021 · 1 comment
Closed
4 tasks done
Labels
bug Something isn't working

Comments

@dziardziel-acaisoft
Copy link

dziardziel-acaisoft commented Dec 7, 2021

  • [ X ] I have verified that the issue occurs with the latest twilio.js release and is not marked as a known issue in the CHANGELOG.md.
  • [ X ] I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
  • [ X ] I verified that the Quickstart application works in my environment.
  • [ X ] I am not sharing any Personally Identifiable Information (PII)
    or sensitive account information (API keys, credentials, etc.) when reporting this issue.

Expected behavior:

I'm able to establish a call

Actual behavior:

Nothing happens. No error is thrown.

I'm pretty sure that this error comes from Vite and @twilio/voice-sdk unable to work together.

My code works perfectly when using vue-cli-service instead of vite, however when I paste the exact same code into vite project, it fails silently (without throwing any errors) at the line:

const params = { To: this.currentNumber };

console.log("BEFORE") // This console.log shows in browser devTools.
this.twilioCall = await this.twilioDevice.connect({ params });
console.log("AFTER") // This console.log won't show in browser devTools.

I've tried to add some console.logs into node_modules/@twilio/voice-sdk/es5/twilio/device.js -> Device.prototype.connect, but even if I try to add it before the first line of the function, it won't print.

Software versions:

  • Browser(s): Chrome, Brave, Firefox,
  • Operating System: macOS 12.01,
  • Vite 2.6.14,
  • Vue 3.2.22
@dziardziel-acaisoft dziardziel-acaisoft added the bug Something isn't working label Dec 7, 2021
@ryan-rowland
Copy link
Contributor

Hi @dziardziel-acaisoft, we don't specifically test usage in conjunction with Vue or Vite, but we are currently investigating #55 and if the root cause is the same this should hopefully address your issue as well. Please watch #55 for updates!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants