Agent Browser does not open in Firefox

Issue

When using Firefox to connect to the Agent Browser, you receive an error similar to:

cag:// link is missing of site address as the following:
cag://?type=connect&deviceid=12908311&cagguid=ee3113fd-baa5-4afa-8de2-5da38e6273d4&loginsession=CC42019004BE87D5AECB3F72F062B858&hostname=ALBERTO-PC&ip=192.168.1.123&username=assistenza%40inetcompany.it&usernameBase64=YXNzaXN0ZW56YUBpbmV0Y29tcGFueS5pdA==&firstname=Inetcompany&lastname=&roleid=5

Cause

The Agent Browser program is not correctly associated with the .cag file.

Resolution

This error can occur even if you have the proper association set in Firefox under Menu > Options > Applications. There are two ways you can resolve this issue:

Resetting the association

Resetting the association is the fastest way to attempt to resolve the issue.

  1. Attempt a connection in the Firefox browser and let the page continue to the error.
  2. Open a new tab and then close the browser tab that displays the error.
  3. On the new Firefox tab, right-click and select Reopen Closed Tab.

The Agent Browser will attempt to launch again. In some cases, the Agent Browser will start correctly and restore the association; in other cases, it may bring up a dialogue box to ask if Agent Browser is the preferred program for this link. Responding yes will associate it going forward.

If the Agent Browser didn't automatically get associated or if selecting the Agent Browser as the preferred application still doesn't allow links to open, try deleting the association.

Deleting the association

The second option is to delete the association and attempt a connection again.

  1. Navigate to Firefox Menu > Help > More Troubleshooting Information.
  2. Open the Profile folder.
  3. Open handlers.json in Notepad or any text editor.
  4. The handlers.json file will appear like this:

    {"defaultHandlersVersion":{"en-US":4},"mimeTypes":{"application/pdf":{"action":3,"extensions":["pdf"]}},"schemes":{"irc":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"ircs":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"mailto":{"action":4,"handlers":[null,{"name":"Yahoo! Mail","uriTemplate":"https://compose.mail.yahoo.com/?To=%s"},{"name":"Gmail","uriTemplate":"https://mail.google.com/mail/?extsrc=mailto&url=%s"}]},"cag":{"action":4,"ask":true}}}
  5. Look for the entry:"cag":{"action":4,"ask":true}.
  6. Delete the text inside the braces, so the entry reads "cag":{}. Be careful to preserve the braces.
  7. Initiate a connection with Firefox again. Firefox may ask for the association, or it may just connect.
  8. NOTE  Firefox or the device may need to be restarted for these changes to take effect.