Commit graph

25 commits

Author SHA1 Message Date
Joshua A. Horton
36e7a2b51a chore(web): proper reporting of errors from es5 KMW 2024-02-22 10:20:32 +07:00
Joshua A. Horton
3230612d9a change(web): final KMW-bundler script cleanup 2023-12-18 10:23:28 +07:00
Marc Durdin
7e7c81e7ee chore(common): reduce strictness on ts for sentry-manager 2023-10-05 15:48:53 +07:00
Marc Durdin
d4e4992714 chore(common): cleanup final Typescript non-ESM metadata
Fixes #9262.
2023-10-04 12:55:51 +07:00
Joshua A. Horton
f21d8183ed chore(web): right, a sourceRoot would help sentry-manager 2023-07-06 12:27:53 +07:00
Joshua A. Horton
7b7fa52a95 chore(web): renames app/webview output, preserves name within embedding apps 2023-04-12 09:00:17 +07:00
Joshua A. Horton
549a3d183a chore(web): missed committing one change 2023-04-10 10:54:08 +07:00
Joshua A. Horton
48610a3b43 fix(common/web): modularizes SentryManager, re-enables it 2023-03-29 09:54:24 +07:00
Marc Durdin
92ed99c4d6 chore(common): build script performance improvements
Improves build script performance by:
* using built-ins wherever possible (e.g. string splitting)
* eliminating redundant code
* using absolute (to $KEYMAN_ROOT) rather than relative paths to avoid realpath
* removing unnecessary `npm run` calls

BEFORE                         | AFTER
-------------------------------|----------------------
time ./core/build.sh --help    |
real    0m2.116s               | real    0m0.874s
user    0m0.578s               | user    0m0.198s
sys     0m0.984s               | sys     0m0.289s
-------------------------------|----------------------
time ./web/build.sh --help     |
real    0m3.523s               | real    0m0.757s
user    0m1.166s               | user    0m0.320s
sys     0m2.273s               | sys     0m0.455s
-------------------------------|----------------------
time ./web/build.sh -d         |
real    1m34.750s              | real    0m59.974s
user    0m9.721s               | user    0m6.284s
sys     0m19.652s              | sys     0m13.202s

@keymanapp-test-bot skip
2023-03-13 07:18:09 +07:00
Marc Durdin
ce864ea923 chore: update standard script prolog to use builtin instead of dirname 2023-02-22 11:04:15 +07:00
Marc Durdin
463c7ff907 chore: remove greadlink from standard script prolog 2023-02-22 10:43:06 +07:00
Marc Durdin
4d53a277f3 chore: use builder_die, remove fail 2023-02-20 09:15:38 +07:00
Joshua A. Horton
878e0f0ea2 chore(common): updates typescript to 4.9.5 2023-02-09 08:40:52 +07:00
Marc Durdin
067028cec2 chore: revise tag variable name to VERSION_GIT_TAG
Introduce new $VERSION_GIT_TAG environment variable, and update all
references to release@version in all projects to use the new variable.
2023-01-21 17:02:50 +07:00
Marc Durdin
ab54c0ecb9 chore(common): more bin bashes 2022-07-25 16:03:22 +10:00
Marc Durdin
ace3e2c6b0
chore: Apply suggestions from code review
Co-authored-by: Joshua Horton <joshua_horton@sil.org>
2022-07-06 15:15:09 +10:00
Marc Durdin
10caf08919 fix(web): only report console errors if _enabled 2022-07-05 13:14:20 +10:00
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
jahorton
3855a25d26 chore(web): Merge branch 'chore/web/fixup-unit-test-fixups' into chore/web/merge-web-version-environment 2022-05-27 10:30:16 +07:00
Marc Durdin
fcf78bcd94 chore: merge master into branch 2022-05-27 13:11:23 +10:00
jahorton
ea74a7f2ce chore(web): adds direct keyman-version compile to many build.sh's 2022-05-24 10:11:57 +07:00
jahorton
8ed70118d5 chore(web): web sentry-manager conversion 2022-05-23 13:36:09 +07:00
Marc Durdin
be51c1b692 chore(web): chmod +x 2022-05-18 06:44:30 +10: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
Marc Durdin
dfd5fad2c7 chore(common): move common/core/web to common/web and flatten 2022-05-17 11:15:22 +10:00