Closed mvtglobally closed 2 years ago
Triggered auto assignment to @yuwenmemon (Engineering
), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
PR to try to fix this (at least the onResubscribe
error) here: https://github.com/Expensify/App/pull/9381
@Beamanator this is still happening to me on Version 1.1.88-7 - Staging Any reason we shouldn't reopen this GH since the deets are the same? Also, more details and logs in #expensify-open-source https://expensify.slack.com/archives/C01GTK53T8Q/p1660149965758469
Weird! Ok so this time I see this error which doesn't look good:
ENSURE_BUGBOT unknown error caught while processing request - Unexpected token < in JSON at position 0 - {"command":"OpenApp","message":"Unexpected token < in JSON at position 0"}
Looks like this error has been happening for a decent amount of us, daily (logs) for commands ReconnectApp
mainly, but sometimes even for OpenApp
Making only daily b/c this doesn't seem to be a deploy blocker - seems to be on production too, and my email exists in the logs too, while I've been able to send messages the last few days - so doesn't seem it happens often enough to cause panic
cc @luacmartins since you worked on both ReconnectApp
and OpenApp
- have you seen these types of errors during dev or anything? (error: Unexpected token < in JSON at position 0
)
I have not, but this error suggests that we are sending an html doc as response to OpenApp?!?! Note <!DOCTYPE
[alXt] ENSURE_BUGBOT unknown error caught while processing request - Unexpected token '<', "<!DOCTYPE "... is not valid JSON ~~ command: 'OpenApp' message: 'Unexpected token '<', "<!DOCTYPE "... is not valid JSON' userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36'
I tried to repro this on dev, staging and prod but no luck so far. Maybe we can wrap ReconnectApp
in a try-catch and throw that error so we have a full stack trace to work with?
Hmm ok continuing looking..
Also seeing [OOPS!] JSON error: Malformed UTF-8 characters, possibly incorrectly encoded
in this set of logs which is interesting
And this info log error a lot: Report action type doesn't have a JSON message
Here's some logs from my account, today, which include the <!DOCTYPE
in the error 🤔
ReconnectApp
requests are hereReport action type doesn't have a JSON message
logs and at the end, [OOPS!] JSON error: Malformed UTF-8 characters, possibly incorrectly encoded
It's looking like this error comes from whatever is returned from GetChats
The message TransactionIDs are not converted to string
is logged right before the JSON error, and this log comes from here, so it looks like the JSON encoding that throws the error is here: https://github.com/Expensify/Web-Expensify/blob/fb989976fa034cdc726f6c4d26ec38c26ce48d08/api.php#L2925
I suggest we either add some logs so we know exactly what is not encoding well - it could be due to the <!DOCTYPE
message found in some logs, it could be some emojis or weird characters that are encoded weird when stored, then we're having trouble decoding them, not sure! Unassigning b/c I really need to focus on some other things at the moment
I'll pick this up since it's related to the OpenApp/ReconnectApp commands
We observed this while looking into some issues @gabrielessner was having in the fireroom here:
More logs here in case they are helpful:
It would probably be good to have more of the JSON revealed/logged when it fails to get parsed?
This is the response https://expensify.slack.com/archives/C03SYCHD988/p1660766084000099?thread_ts=1660679114.219859&cid=C03SYCHD988
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”><html xmlns=“http://www.w3.org/1999/xhtml”><head><meta http-equiv=“Content-Type”content=“text/html; charset=UTF-8”/><meta http-equiv=“X-UA-Compatible”content=“IE=Edge,chrome=1”><meta name=“viewport”content=“width=device-width”><!--[if lte IE 9]>
<script type=“text/javascript”>
var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf(‘/’) + 1);
if (sPage != “browserupgrade”)
window.location=“browserupgrade”;
</script>
<![endif]-->
<title>Expensify - Api</title>
<link rel=“icon” type=“image/png” href=“https://d2k5nsl2zxldvw.cloudfront.net/images/expensify-favicon.png”>
<meta name=“keywords” content=“expense report, expense report template, expenses, small business expense, expense reimbursement, card import, travel expense, conference”/>
<meta name=“description” content=“Import expenses directly from a credit card to create free expense reports quickly. Approve reports online and reimburse directly to a checking account with one click.“/>
<meta name=“robots” Content=“Index,Follow” />
<link rel=“stylesheet” type=“text/css” href=“https://d2k5nsl2zxldvw.cloudfront.net/dist/css-gz/style.04750fac.css.gz” />
<link rel=“chrome-webstore-item” href=“https://chrome.google.com/webstore/detail/oiicpdkmeclmgmlmbajefnkalcfageek”>
<style type=“text/css”>
</style>
</head>
<body id=“api” class=“year2022 month08 day17 week33 Wednesday ofh”>
<div id=“loadingBackground”>
<div class=“spinner spinner-large”></div>
</div>
<div id=“loadingImage”>
<div id=“loader”></div>
<div id=“loadingText”></div>
<div class=“loadingMessagesWrapper hidden”>
<div class=“loadingMessagesTitle” id=“loadingTitle”></div>
<div id=“loadingMessages”>
<ul id=“loadingList”></ul>
</div>
</div>
</div>
<!-- Checkbox to show menu -->
<input type=“checkbox” id=“menu-toggle” />
<div class=“sidepane sidepane--guest production”>
<div class=“sidepane__logo”>
<a href=“/signout?clean=true”>
<h1 class=“expensify_com”>Expensify</h1>
</a>
</div>
<div class=“sidepane__nav”>
<ul role=“navigation”>
<li>
<a href=“/signin”>
<span class=“expensicons expensicons-switch”></span>Sign In
</a>
</li>
<li>
<a href=“/signup”>
<span class=“expensicons expensicons-user-add”></span>Sign Up
</a>
</li>
</ul>
</div>
</div>
<!-- Menu icon for smaller screen sizes -->
<label for=“menu-toggle” class=“menu-icon”>
<span></span>
</label>
<!-- App content overlay (only visible when sidepane is expanded) -->
<label for=“menu-toggle” class=“sidepane-overlay”></label>
<div class=“app-content-wrapper”>
<div id=“bannerAnnouncement” class=“banner-announcement”>
<div id=“bannerAnnouncement_chromeExtension” class=“hidden banner-announcement__inner”>
<a target=“_blank” id=“bannerAnnouncement_chromeExtension_trigger”>Try the new Expensify extension for Google Chrome™!</a> <a class=“expensicons expensicons-remove expensicons-sm”></a>
</div>
</div>
<div class=“app-content”>
<div id=“content_wrapper” role=“main”>
<div class=“page-header”>
<h1></h1>
</div>
<div>
JSON error: Malformed UTF-8 characters, possibly incorrectly encoded
</div>
</div>
</div>
</div>
<div class=“app-footer”>
<div class=“clearfix”>
<ul class=“app-footer__links textLinks”>
<li><a href=“https://use.expensify.com/terms” target=“_blank” rel=“noopener noreferrer” title=“Terms”>Terms</a></li>
<li><a href=“https://www.expensify.com/privacy” target=“_blank” rel=“noopener noreferrer”>Privacy</a></li>
<li><a href=“https://use.expensify.com/licenses” target=“_blank” rel=“noopener noreferrer”>Licenses</a></li>
<li><a href=“http://status.expensify.com/” target=“_blank” rel=“noopener noreferrer” title=“Status”>Status</a></li>
</ul>
<div class=“app-footer__copyright”>
© 2008-2022 Expensify, Inc.
</div>
</div>
</div>
<div id=“dialog_overlay”></div>
<div id=“reports_popup_user_menu” class=“reports_popup right_align hidden”>
<div class=“reports_popup_inner_tb”>
<span class=“submenuheader”>
<div class=“userPictureLarge”>
<div class=“changePicture js_changePicture”>Change</div>
</div>
<p class=“userEmail selectable”>
<span id=“userHandleWelcomeMessage” class=“userSubtext”>Welcome back,</span>
<strong><span id=“userHandleDisplay” class=“nomargin”></span></strong>
<span id=“userHandleEmailSubtext” class=“userSubtext hidden”></span>
</p>
<div class=“marginTop js_signout”>
<a href=“/signout”>
<span class=“expensicons expensicons-switch expensicons-sm depreciated vAlignMiddle inlineBlock”></span>
<span class=“vAlignMiddle inlineBlock”>Sign Out</span>
</a>
</div>
<div class=“marginTop” id=“delegateReturnHome”>
<a href=“#”>
<span class=“expensicons expensicons-switch expensicons-sm depreciated vAlignMiddle inlineBlock”></span>
<span class=“vAlignMiddle inlineBlock”>Return to your account</span>
</a>
</div>
</span>
<div id=“delegatedAccessContainer”>
<div class=“link label”>Copilot access:</div>
<div id=“delegateAccessList”></div>
</div>
<div class=“link js_viewChanges”>
<span class=“expensicons expensicons-megaphone expensicons-sm depreciated floatLeft marginRight5"></span>
<span class=“badge success floatRight hidden”>NEW!</span> <a href=“#”>Product Changes</a>
</div>
<div class=“link js_help-feedback”>
<span class=“expensicons expensicons-question-mark-circle expensicons-sm depreciated floatLeft marginRight5"></span>
<a href=“#”>Help and Feedback</a>
</div>
<!-- <div class=“link js_changePicture”><a href=“#”>Change your Profile Picture with Gravatar</a></div> -->
<div id=“activePolicySelectorContainer” class=“hidden”>
<div class=“link label”>Use this expense policy:</div>
<div id=“activePolicyList”></div>
</div>
</div>
</div>
<div style=“display:none;“>
<form id=“saveascsv_form” action=“/jsontocsv” method=“POST”>
<input type=“hidden” id=“saveascsv_data_input” name=“csvData” />
<input type=“hidden” id=“saveascsv_header_input” name=“csvHeader” />
<input type=“hidden” id=“saveascsv_filename_input” name=“filename” />
<input type=“hidden” id=“saveascsv_type_input” name=“type” />
<input type=“submit” id=“saveascsv_submit_button” />
</form>
</div>
<script type=“text/javascript”>
DEBUG = 0;
</script>
<!--************************************************************************
TEMPLATES
*************************************************************************-->
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/module-vendor.ec0f3593.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/module-shared.e4c775c8.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/module-expensify.516d1cce.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/module-external.1a4f98e4.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/module-deprecated.cb41ef2e.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/module-lib.0c24662b.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/module-class.271d4bf7.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/module-mixin.d41d8cd9.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/module-component.67447144.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/module-app.e996dbd1.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/module-homepage.ca80d44f.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/mcc.6dd34bb7.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/currencyInfo.deb45929.js.gz”> </script>
<script type=“text/javascript” src=“https://d2k5nsl2zxldvw.cloudfront.net/dist/js-gz/waf.4d7d0183.js.gz”> </script>
<script type=“text/javascript” src=“https://www.expensify.com/newjs/banklist.php”> </script>
<script type=“text/javascript”>
hideLoading();
</script>
<script type=“text/javascript”>
User.setAccountJSON( null );
var g_account = User.getAccountJSON(); // @todo remove after refactoring
</script>
<script async src=“https://www.googletagmanager.com/gtag/js?id=AW-942650393”></script><script type=“text/javascript”>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag(“js”, new Date());gtag(“config”, “AW-942650393”);var _gaq=_gaq||[];_gaq.push([“_setAccount”,“UA-5524924-1”]);_gaq.push([“_setDomainName”,“[expensify.com](http://expensify.com/)”]);_gaq.push([“_trackPageview”]);(function(){var a=document.createElement(“script”);a.type=“text/javascript”;a.async=!0;a.src=(“https:“==document.location.protocol?“https://ssl/”:“http://www/”)+“.[google-analytics.com/ga.js](http://google-analytics.com/ga.js)”;var b=document.getElementsByTagName(“script”)[0];b.parentNode.insertBefore(a,b)})();</script>
</body>
</html>
Looks like something related to react-navigation
may have been mentioned in this issue discussion.
As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js
files should not be accepted.
Feel free to drop a note in #expensify-open-source with any questions.
Just adding more context - https://expensify.slack.com/archives/C01GTK53T8Q/p1660913217196589
Asked for help in #engineering-chat
It would probably be good to have more of the JSON revealed/logged when it fails to get parsed?
I think this is good, but maybe to avoid logging sensitive info (private chats?) we could try to do some search of non utf-8 characters and log only that? (don't know if it possible)
It just happened to me again, would logs/vid be helpful? Desktop v1.1.88-14
⚠️ Looks like this issue was linked to a possible regression on PRODUCTION here
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a production regression has occurred a Root Cause Analysis is required. Please follow the instructions here.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
⚠️ Looks like this issue was linked to a Deploy Blocker here
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
This was solved here https://github.com/Expensify/Web-Expensify/pull/34671. Closing.
Sweet! I was able to sign out then back into desktop 15 mins ago and it's working fine so far 🤞
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Additional repro steps:
Expected Result:
For chat to show in LHN
Actual Result:
Chats do not show in LHN until you refresh
Workaround:
unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.75-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/43995119/172922211-55f6bee7-4b5e-43b2-9e0a-a6b9ca511e31.MP4
Expensify/Expensify Issue URL: Issue reported by: @mallenexpensify Applause Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1654795218684169
View all open jobs on GitHub