e-mission/e-mission-docs

App not recognizing email in internal beta

jRaffill opened this issue · 4 comments

In version 2.9.0-beta1 I tried to use the 'email log' button but it didn't work. It said that my email was not configured.
"Alert: No email address configured. TypeError: cordova.plugins.email.isAvailable is not a function."

@jRaffill thank you for your feedback. It turns out that this was due to an incompatible change in the emailComposer plugin.
https://github.com/katzer/cordova-plugin-email-composer/blob/41994ee4a5f9f06837ae34a84b5c6151d19e9712/CHANGELOG.md#L12

isAvailable was replaced by hasClient and hasAccount.

Unfortunately, the wrapper we were using to access this data (ngCordova) is now deprecated and does not support the new hasAccount method. Switched to using the plugin directly without the ngCordova wrapper. Removing the ngCordova wrapper also meant that I had to switch to direct access for the inAppBrowser as well.

All related changes are in
e-mission/e-mission-phone@61513d9

And then it turned out that the behavior of isAvailable is now subtly different without access to the GET_ACCOUNTS permission.

Fixed in e-mission/e-mission-phone@38d0ab2

Emailing logs now works on both android and iOS