Commit graph

1682 commits

Author SHA1 Message Date
Marc Durdin
0b64871be3 fix(web): improve console.error() reporting
The back story:

Currently Keyman for Android reports errors sent to the console via
`console.error()` into Sentry but sentry-manager itself does not. This
means that Keyman for iPhone and iPad and other users of sentry-manager
do not report these errors. Many of these errors are important.

What's worse is that Keyman for Android's error reporting here (via the
`sendKMWError()` function in Keyman Engine for Android) does not capture
stack traces, and so many of the errors we get do not have enough
information to resolve them.

Furthermore, by having `sendKMWError()` in Keyman for Android, we
capture exceptions and other program errors twice -- once on the web
side, and once on the Java side -- this adds noise to our error
reporting. Sentry also tends to lump many unrelated `sendKMWError()`
events together, so tracking resolution to the errors is painful.

The fix:

This adds a patch to sentry-manager to capture `console.error()` and
`console.warning()` events and report them through Sentry's normal error
reporting, and disables the `sendKMWError()` report (although we leave
the breadcrumb in place for when there are later, related Java errors).
There is a Sentry integration called CaptureConsole, but it does not
support capturing stack traces until v6.14
(https://github.com/getsentry/sentry-javascript/pull/4034). Updating
Sentry to 6.14 or newer is a bigger job (due to ES6 baseline req. etc.)

Note that Keyman for iOS currently has some other stubs in place
overriding the `console.*` functions. These should be removed for
release builds, so that we can use this pattern instead. I will try and
tackle this in a follow-up PR (I will build it on my mac so I can test
it).

A sample error report captured with this mechanism (no sourcemaps here
because this is a -local build):

https://sentry.io/organizations/keyman/issues/3401287467/events/c40fd2cebb7743cc8dfe72e0dd34bf65/?project=5983524

I am proposing we back-port this to 15.0-stable as we are missing a lot
of data in many of our error reports on Android.
2022-07-05 10:57:42 +10:00
Joshua Horton
f6841333a2
Merge pull request #6557 from keymanapp/change/web/5943-ie-rooting
change(web): drops old IE-related handling code
2022-06-24 08:35:03 +07:00
Marc Durdin
0212727b98 chore: Merge branch 'master' into chore/beta-to-master-A16S4 2022-06-15 12:54:35 +10:00
Marc Durdin
1199c5602a
Merge pull request #6704 from keymanapp/fix/android/getKeyboardInfo-with-invalid-index
fix(android): check index validity in getCurrentKeyboardInfo
2022-06-15 06:17:52 +10:00
jahorton
3738519412 chore(android): adds diagnostic logging to assist a fix for #6703 2022-06-13 10:50:32 +07:00
Marc Durdin
4a9b529562
Merge pull request #6671 from keymanapp/fix/android/hardware-key-no-vibrate
fix(android/engine): Disable haptic feedback on hardware keystrokes
2022-06-10 07:24:51 +10:00
Marc Durdin
958fbd3e40 fix(android): check index validity in getCurrentKeyboardInfo
This fixes crash reported as #6703. This issue was first reported in
14.0.282-stable. I have done a careful review of changes in 14.0.282
(and 14.0.281) but have been unable to find any changes that could have
bearing on this.

The basic issue is that there appears to be some circumstances where
`KMManager` thinks that it has a keyboard loaded (ref
`SystemKeyboardLoaded` variable), but `KMKeyboard.currentKeyboard` is
still `null`.

The crash has been reported for only a very small set of users, 119 at
time of fix, but average reports per user is over 100. As is usual with
this type of thing, a small fraction of those users are reporting the
majority of crashes. I have not found any real commonality across the
error reports -- they are geographically dispersed, across multiple
device types and Android versions.

Note that this addresses the error at hand but as I am unable to
reproduce the issue, does not necessarily address the root problem, so
there may still be other issues reported even after this is fixed.

A longer-term refactor would eliminate `SystemKeyboardLoaded` because
from what I can tell, we should always be able to determine that from
the state of `KMKeyboard.currentKeyboard`. However, the state
entanglement is a lot deeper than just those two variables, with cross
references to keyboard indexes between `KMManager` and `KMKeyboard`
which need to be resolved (`KMKeyboard` should *never* refer to
`KMManager`).
2022-06-05 06:46:39 +10:00
Marc Durdin
b69872d589 fix(android): move hardware keystroke flag to JS module 2022-06-04 08:44:24 +10:00
jahorton
93e36539de chore(android): build now includes es6-shim polyfill 2022-05-31 09:30:52 +07:00
Marc Durdin
fcf78bcd94 chore: merge master into branch 2022-05-27 13:11:23 +10:00
Darcy Wong
7988b59eff fix(android/engine): Disable haptic feedback on hardware keystrokes 2022-05-27 08:14:09 +07:00
Darcy Wong
d247e475df chore(common): Update crowdin strings for Spanish (Latin America) 2022-05-24 08:37:34 +07:00
Darcy Wong
7e72074d57 fix(android/engine): Cleanup when subkeys displayed 2022-05-20 12:27:59 +07:00
Darcy Wong
0a39e4e4b1 chore(android/engine): Use switch statement for gesture 2022-05-20 11:32:57 +07:00
Darcy Wong
9916da44aa fix(android/engine): Investigate sticky long-press keys 2022-05-20 11:32:57 +07:00
Darcy Wong
4cdb5072f7
Update android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsActivity.java
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-05-20 09:17:10 +07:00
Darcy Wong
4afd872f29 chore(android): Rename variables per review 2022-05-19 09:50:13 +07:00
Marc Durdin
05a4c33200 chore(web): move common/core/web to common/web
Relates to #5816.

Moves folders under common/core/web to common/web:

* input-processor -> common/web/input-processor
* keyboard-processor -> common/web/keyboard-processor
* tools/recorder -> common/web/recorder
* tools/sentry-manager -> common/web/sentry-manager
* utils -> common/web/utils

Updates scripts and configuration to point to new folders.
2022-05-18 06:01:03 +10:00
Darcy Wong
25acb85f04 chore(android): Update screenshot of Settings menu 2022-05-17 14:08:47 +07:00
Darcy Wong
3eb5508eac chore(android/app): Update help 2022-05-17 13:47:57 +07:00
Darcy Wong
ced46c8a2e feat(android): Add UX to control haptic feedback 2022-05-17 13:44:34 +07:00
Darcy Wong
ab8ff86c4b feat(android/engine): Add haptic feedback when typing 2022-05-17 13:07:22 +07:00
Darcy Wong
76e08e670c fix(android/engine): Refresh OSK when changing spacebar text 2022-05-16 11:45:15 +07:00
Marc Durdin
8efcb5d64a chore(web): embedded web cleanup 2022-05-12 07:37:10 +10:00
Darcy Wong
7c3de5bbc3 chore(common): Merge remote-tracking branch 'origin/beta' into chore/common/crowdin-pl 2022-05-11 14:28:50 +07:00
Darcy Wong
638fedfc7b chore(android): Add crowdin strings 2022-05-10 20:44:50 +07:00
Darcy Wong
7773cdfe22 chore(common): Add crowdin strings for Polish 2022-05-09 12:41:36 +07:00
Darcy Wong
384f8befcb chore(common): Add crowdin strings for Italian 2022-05-09 11:04:12 +07:00
Darcy Wong
5a3c7effe3 chore(android/engine): Ignore DownloadManager if ID not found 2022-04-29 14:43:18 +07:00
Darcy Wong
04985017ab
Merge pull request #6562 from keymanapp/chore/common/crowdin-ff-2
chore(common): Update Crowdin strings for Fula
2022-04-29 14:15:08 +07:00
Darcy Wong
135945981c
Merge pull request #6559 from keymanapp/fix/android/toggle-suggestion-banner
fix(android/engine): Check suggestion banner after setting keyboard
2022-04-29 07:47:35 +07:00
Darcy Wong
1bff2cd799 chore(android/engine): Rename result variables 2022-04-27 11:44:32 +07:00
Darcy Wong
a884786926
Merge pull request #6561 from keymanapp/fix/android/localize-toast-messages
fix(android/engine): Localize some Toast notifications
2022-04-26 15:41:26 +07:00
Darcy Wong
e3e8e63a27 chore(common): Update Crowdin strings for Fula 2022-04-25 14:34:44 +07:00
Darcy Wong
97a817065b fix(android/engine): Localize some Toast notifications 2022-04-25 14:19:07 +07:00
Darcy Wong
b7e2d7c47e chore(android): Revert "test(android): Test code for v 1.9.3 of sil_euro_latin"
This reverts commit fcca82891b.
2022-04-25 09:34:06 +07:00
Darcy Wong
30fc5b0434 fix(android/engine): Check suggestion banner after setting keyboard 2022-04-22 14:58:17 +07:00
Darcy Wong
fcca82891b test(android): Test code for v 1.9.3 of sil_euro_latin 2022-04-22 09:21:59 +07:00
Darcy Wong
bc109739f1 fix(android/engine): Don't show welcome.htm on keyboard package update 2022-04-22 09:16:54 +07:00
Marc Durdin
1d1b91af57
Merge pull request #6494 from keymanapp/fix/android/6489-key-tip-sticky
fix(android): key tip sticky with multitap
2022-04-19 06:51:09 +10:00
Darcy Wong
55a81fde70
Merge pull request #6532 from keymanapp/chore/common/crowdin-bwr-ng
chore(android,windows): Update crowdin strings for bwr-NG
2022-04-18 15:19:57 +07:00
Darcy Wong
b84a483afc chore(android): Update crowdin for bwr-NG 2022-04-14 09:39:38 +07:00
Darcy Wong
1ae6709bfa chore(android): Remove incorrect bwr-NT locale 2022-04-14 09:21:17 +07:00
Darcy Wong
1e42d360c6
Merge pull request #6509 from keymanapp/chore/common/crowdin-pt
chore(common): Add Crowdin strings for Portuguese (pt-PT)
2022-04-14 06:11:02 +07:00
Marc Durdin
e86cd46520 chore(android): Merge branch 'beta' into fix/android/6489-key-tip-sticky 2022-04-14 05:27:29 +10:00
Darcy Wong
d774fcd5a1 chore(android/app): Add description for referrer response error 2022-04-12 10:52:13 +07:00
Darcy Wong
6b2a71a76e
Merge pull request #6501 from keymanapp/chore/common/crowdin-km-spacebar
chore(common): Update km strings
2022-04-11 15:12:19 +07:00
Darcy Wong
243361f052
Merge pull request #6508 from keymanapp/chore/common/crowdin-az-2
chore(common): Update Crowding strings for Azerbaijani
2022-04-11 07:42:31 +07:00
Darcy Wong
cb10a4c4e3
Merge pull request #6477 from keymanapp/fix/android/engine/verify-count-surrogate-pairs
fix(android/engine): Update countSurrogatePairs()
2022-04-09 08:10:43 +07:00
Darcy Wong
f0e41833c4 chore(common): Add Crowdin strings for Portuguese 2022-04-08 11:36:18 +07:00