rokwire / illinois-app

Source code repository of "Illinois" App - the official mobile app of the University of Illinois.
https://app.illinois.edu/
Apache License 2.0
23 stars 21 forks source link

[BUG] Event "Register" button does not work with external links #4001

Closed vburgett closed 6 months ago

vburgett commented 8 months ago

Links in the "Add external link for registration" field do not work in the Illinois app.

  1. I created the event "VB Test Link Fields" on 2/28/24 via the admin website.
  2. I added this link for external registration https://app.joinhandshake.com/edu/events/1449642
  3. In the app, tap on the "Register" button and see the error "Failed to parse url"
  4. In the app, I tried to edit the "Add external link for registration" field and the resulting error was the same.

I expect the Register button in the app to lead to the above link in a browser.

This is an issue on prod and dev.

Screenshot_20240226-123336

mihail-varbanov commented 8 months ago

Hi @vburgett , the problem was that your URL contained a space at the beginning of the URL string:

"registration_details":{
  "external_link":" https://app.joinhandshake.com/edu/events/1449642",
  "label":"Sign Up",
  "max_event_capacity":null,
  "registrants_external_ids":null,
  "type":"external"
}

If you used the "Confirm URL" link when you created the event you would have noticed that it did not launch the URL in an external browser.

The fix includes:

1. Trim url before attempting to parse and launch it. Now the URL from your test event is opened successfully. 2. If Confirm URL fails to parse the URL it will report "Failed to parse url" instead silently not opening the URL, or in other words do nothing.

This is available in v5.2.1.

vburgett commented 6 months ago

Fixed in 5.1.34.