0perationPrivacy / VoIP

Web Base Telnyx/Twilio VoIP Interface enabling SMS, MMS and Voice calls using the providers API Keys and self-hosting the application.
https://VoIP.OperationPrivacy.com
GNU General Public License v3.0
249 stars 421 forks source link

Cannot read properties of undefined (reading 'id') #183

Closed sergiozygmunt closed 1 year ago

sergiozygmunt commented 1 year ago

To Reproduce

  1. Create a clean environment with no users
  2. Sign up and login
  3. Add a profile
  4. Go into "profile settings"
  5. Paste the telnyx API key and pick a DID
  6. Upon clicking save you will get Cannot read properties of undefined (reading 'id')

Expected behavior Number saves correctly, as it does in the demo [VoIP.OperationPrivacy.com](https://voip.operationprivacy.com/)

Screenshots

Screenshot 2023-01-05 at 22 25 13 Screenshot 2023-01-05 at 22 25 23
sergiozygmunt commented 1 year ago

Sorry for the bump but has anyone else run into this?

huzaifa3115 commented 1 year ago

Yes, this is because you need to select profile from list (header->dropdown), although our team is working on error handling with proper message

sergiozygmunt commented 1 year ago

I have ensured that I have a profile selected, and I am still getting this error - see screenshots (API keys voided since uploading screenshots)

Screenshot 2023-01-16 at 22 25 26 Screenshot 2023-01-16 at 22 25 22 Screenshot 2023-01-16 at 22 25 01 Screenshot 2023-01-16 at 22 26 21
sergiozygmunt commented 1 year ago

I have attached a HAR of me completing these steps:

  1. Accessing the site
  2. Ensuring that a profile is selected
  3. Modifying the profile settings and fetching the Telnyx numbers
  4. Attempting to select a number and getting the error
  5. Switching profiles and repeating 2 through 4. voip.issue.183.har.zip
sergiozygmunt commented 1 year ago

I've tried deleting and re-deploying the app on both platforms with no luck - any potential other things I should check out?

0perationPrivacy commented 1 year ago

when I navigate to your your domain in the logs (https://voip.safesecuretrusted.com), it prompts me for the CloudFlare Zero trust access. If that's the URL instead of (https://voip-safesecuretrusted-com.herokuapp.com), then we have an issue. Pick one, that could be blocking the api calls.

sergiozygmunt commented 1 year ago

I have changed the base url to voip-safesecuretrusted-com.herokuapp.com and re-deployed but still get the same error, even when accessed it via voip-safesecuretrusted-com.herokuapp.com.

0perationPrivacy commented 1 year ago

if you change URLs, some references may remain in the twilio/telnyx, you will need to hit save on the profile window to re-write those api URLs. Make sure to do that.

sergiozygmunt commented 1 year ago

I have flushed cache, logged in out, created new profiles, but still get Cannot read properties of undefined (reading 'id')

sergiozygmunt commented 1 year ago

Does Operation Privacy have any commercial (paid) support options? I've tried this re-deployment like ten times and have followed all the recommended steps but aren't getting anywhere. I am still getting the same error.

0perationPrivacy commented 1 year ago

Does Operation Privacy have any commercial (paid) support options? I've tried this re-deployment like ten times and have followed all the recommended steps but aren't getting anywhere. I am still getting the same error.

No, but I'll be glad to get on a call with you to go over the setup and figure out where the issue lies. A screen share session. hit me up on the matrix chat.

sergiozygmunt commented 1 year ago

I fixed this by re-trying the deploy on Render (from scratch, new db everything), ensuring that I added a trailing / at the end of the host value - thank you to everyone for your help!

slfhstr commented 1 year ago

@sergiozygmunt I have run into this issue on a fresh install, using a self-hosted environment with Docker. When you say ensuring that I added a trailing / at the end of the host value, are you referring to BASE_URL ?

sergiozygmunt commented 1 year ago

Yes, your BASE_URL should have a / at the end of it. Something like https://voipsuite.yourdomain.com/ should work.

slfhstr commented 1 year ago

Thank you. If I can get my Docker implementation working, my other recent question about TextEncoder will not be an issue.

sergiozygmunt commented 1 year ago

Please let me know if you do or if you have a page or something I can follow as I would also like to get it off of public cloud but was concerned with the limitations of the LSX method you previously wrote about.

slfhstr commented 1 year ago

Yay ! That's fixed it ! Would you be interested for me to share my Docker implementation ? If so, how is best for you ? Fork this repo ? Never done that, but will stumble through. Or a new repo ?

sergiozygmunt commented 1 year ago

Yeah for sure - fork is probably best, so it's easy to merge upstream changes/updates.

0perationPrivacy commented 1 year ago

Yay ! That's fixed it ! Would you be interested for me to share my Docker implementation ? If so, how is best for you ? Fork this repo ? Never done that, but will stumble through. Or a new repo ?

You can also start a Discussion and put in some basic procedures there for others, along with any links you like.