Decoding Analytics report's obfuscated (Proguard) exception location - exception

Lines from my 'Exception Description' from Google Analytics 'Crashes and Exceptions' report include:
IllegalArgumentException (#ak:g:-1) {Thread-8609}
IllegalStateException (#w:a:-1) {main}
I'm trying to decode them with the Proguard GUI as the Proguard mapping file is 33693 lines long, including hundreds of '-> ak' and '->w' lines. I've tried editing the exception lines down and adding a 'proguard.' preface without any luck:

There is now another way to decode obfuscated exception reports.
If you connect your app to the new Firebase developer platform and add Firebase Analytics to your code, you will get access to the Firebase Developer Console. If you click the 'Crash Reporting' tab, it will give you a detailed list of your crashes, including app version number. Click on any of the crash listings and you will get a full trace, including an 'Upload a ProGuard mapping file to deobfuscate future stack traces for version xxx' message. Click the 'UPLOAD' button and browse to your 'mapping.txt' file. Upload the file and, voilĂ , the trace is decoded.
If you've never browsed to your 'mapping.txt' file, it's well buried at 'app/build/outputs/mapping/release'.
Configuring and coding for Firebase and Firebase Analytics I'll leave to the Docs, and to Stack Overflow if you have issues.

Related

All our live HTML forms stopped sending data, I'm desperate for any suggestions as to how this could happen

Our portal has been running on Liferay 6.2 for several years. We have many services that use HTML forms (usually written with Alloy UI in Freemarker) to allow users to submit requests. The server code is written in Java and uses the liferay portletrequest objects to return the submit form data.
However, recently these forms suddenly stopped working.
Specifically: if the form includes a file for uploading, then the ActionRequest object does not return any of the form fields as parameters the way it usually does (request.getparameter(paramtername) returns null instead of the string value that the user entered into the form). If the user does not include any files then it works normally.
This doesn't seem to be an issue with the forms or the java code as many forms who's code has not been touched in years suddenly stopped working. What's more this stopped working partway through a day in which we didn't make any changes to the application.
I'm struggling to understand what I'm seeing in the logs. The error messages that feel most promising look like:
Caused by: org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:351)
at org.apache.commons.fileupload.portlet.PortletFileUpload.parseRequest(PortletFileUpload.java:109)
at org.springframework.web.portlet.multipart.CommonsPortletMultipartResolver.parseRequest(CommonsPortletMultipartResolver.java:151)
... 208 more
But I haven't been able to find anything that seems relevant. Another type of error that might be related looks like:
10:00:09,095 WARN [http-bio-8080-exec-272][FileImpl:422] Unable to extract text from Scan4.JPG
org.apache.tika.exception.TikaException: Unexpected RuntimeException from org.apache.tika.parser.jpeg.JpegParser#3e34efc2
We've been trying to track down the issue for days now, I'm desperate and out of ideas. Can anyone think of any possible reasons why files would not upload?

WebAssembly crash info in window.onerror()

I am trying to collect crash logs for my WebAssembly application. It's built with emscripten, everything is served from the same domain, testing in Chrome. In the developer console I see a proper error with stack trace when a crash occurs, I'd like to capture this and send it to a server.
Instead I am only getting "Script error." passed to window.onerror() and the fifth parameter is null. This is supposed to happen when violating the same-origin policy (linked question is only about javascript, does not talk about this WebAssembly-specific problem.) Errors occurring in the .js file don't have this problem, only webassembly runtime errors.
I added the crossorigin attribute to the .js file generated by emscripten. The site is running in secure context, the Response object passed to WebAssembly.instantiateStreaming() (in the emscripten-generated .js file) has "basic" as its .type, so as I understand it has no restrictions on what can be done with it. "Access-Control-Allow-Origin" header is set to "*".
For some weird reason I managed to get the full error with stack trace exactly once, so it is apparently possible, but seemingly doing everything the same way I can't get it to work again.
How can this be solved?
instantiateStreaming is promised based so maybe try window.addEventListener('unhandledrejection')?

Exceptions with Microsoft Teams Connector - errors 500 "Install app id lookup failure", "Cannot read property 'ConfigurationsVisible'"

I'm developing a connector for Teams, and constantly getting 500 errors in web client during lengthy debugging sessions.
What I usually do are multiple subsequent microsoftTeams.settings.get/setSettings calls, adding/removing sideload package, adding/removing connector from my team, sending messages to Outlook web hooks and so on. Everything is working fine, but after some period of time I start getting errors for currently used connector id as described below. This definitely has something to do with Connectors backend stuff because creating a new team and new connector in Connectors Developer Dashboard usually helps me to proceed.
Example. When I'm sideloading new version of extension, choosing team, then the channel, clicking "Set up", this error pops up in the console and I'm being redirected to Connectors list for a channel.
2018-12-24T15:05:42.342Z Received error from connectors {"seq":1545227948597,"timestamp":1545663941386,"flightSettings":{"Name":"ConnectorFrontEndSettings","AriaSDKToken":"d127f72a3abd41c9b9dd94faca947689-d58285e6-3a68-4cab-a458-37b9d9761d35-7033","SPAEnabled":true,"ClassificationFilterEnabled":true,"ClientRoutingEnabled":true,"EnableYammerGroupOption":true,"EnableFadeMessage":false,"EnableDomainBasedOwaConnectorList":false,"EnableDomainBasedTeamsConnectorList":false,"DevPortalSPAEnabled":true,"ShowHomeNavigationButtonOnConfigurationPage":false},"status":500,"clientType":"SkypeSpaces","connectorType":"Manage","name":"ClientError","nonPIIInfo":"{\"name\":\"Install app id lookup failure f0e3cf15-cef0-48f1-bf75-25785bf62c63\"}"}
My connector is present in the bottom of the list and I can access its config page, but cannot save the configuration - getting empty 500 error ("{\"exception\":{}}"). Expected behavior - sideload, choose team, choose channel, "Set up", redirect to a connector configuration page, save configuration.
When I'm clicking on my sideloaded connector in this list I'm getting another error:
"TypeError: Cannot read property 'ConfigurationsVisible' of undefined\",\"stack\":\"TypeError: Cannot read property 'ConfigurationsVisible' of undefined\\n at p.ConfigurationsCtrl.n.toggleConfigurationDetails (https://outlook.office.com/connectors/Static/app.min.js?v=16.01.1362.003:1:57930)\\n at fn (eval at compile (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:124257), <anonymous>:4:698)\\n at t (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:67388)\\n at u (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:143542)\\n at p.$eval (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:77312)\\n at p.$apply (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:77546)\\n at HTMLDivElement.<anonymous> (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:143594)\\n at HTMLDivElement.dispatch (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:28337)\\n at HTMLDivElement.v.handle (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:25042)\"}"}
Is there any way to troubleshoot/"reset" connector other than deleting and recreating it from scratch? My latest connector id that has this issue is 1b263a28-4d0f-45bd-8f76-da573f11bd6e.
p.s. I also suspect connector settings are cached somewhere, because today I've changed connector configuration url in code, manifests and Connectors Dashboard, but it was still hitting to the "old" route. Switching to another connector id from list helped.
UPDATE
The "faulty" connector also causes another 500 error when trying to remove it from the channel (right after 'Remove' click in configuration tab):
2018-12-25T16:45:56.300Z Received error from connectors {"seq":1545227949598,"timestamp":1545756356278,"flightSettings":{"Name":"ConnectorFrontEndSettings","AriaSDKToken":"d127f72a3abd41c9b9dd94faca947689-d58285e6-3a68-4cab-a458-37b9d9761d35-7033","SPAEnabled":true,"ClassificationFilterEnabled":true,"ClientRoutingEnabled":true,"EnableYammerGroupOption":true,"EnableFadeMessage":false,"EnableDomainBasedOwaConnectorList":false,"EnableDomainBasedTeamsConnectorList":false,"DevPortalSPAEnabled":true,"ShowHomeNavigationButtonOnConfigurationPage":false},"status":500,"clientType":"SkypeSpaces","connectorType":"Manage","name":"ClientError","nonPIIInfo":"{\"name\":\"Error: [$rootScope:inprog] $digest already in progress\\nhttp://errors.angularjs.org/1.5.0/$rootScope/inprog?p0=%24digest\",\"stack\":\"Error: [$rootScope:inprog] $digest already in progress\\nhttp://errors.angularjs.org/1.5.0/$rootScope/inprog?p0=%24digest\\n at https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:3340\\n at nt (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:73371)\\n at p.$digest (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:75654)\\n at p.$apply (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:77596)\\n at HTMLDocument.<anonymous> (https://outlook.office.com/connectors/Static/app.min.js?v=16.01.1362.003:1:59080)\\n at HTMLDocument.dispatch (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:28337)\\n at HTMLDocument.v.handle (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:25042)\\n at Object.trigger (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:27423)\\n at Object.simulate (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:30815)\\n at HTMLDocument.r (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:4:1788)\"}"}
After that I click 'Remove' in the popup, web client freezes and returns to connector list without refresh. My connector is still listed there as if it was not removed (it actually did).

Error uploading app to Windows Store with WindowsPhoneReservedAppInfo.xml file

We have referred to this MSDN article for help on locking down the hardware buttons on our device.
The article is pretty straightforward and I managed to generate a prov.xml file with the help of our manufacture however when we try and upload our app to the Windows Store we get the following error:
Package acceptance validation error: File WindowsPhoneReservedAppInfo.xml is invalid: The 'Id' attribute is invalid - The value 'ID_CAP_ENTERPRISE_SHARED_DATA' is invalid according to its datatype 'http://schemas.microsoft.com/phone/2013/windowsphonereservedappinfo:ST_SoftwareCapability' - The Enumeration constraint failed.
I would have thought we would be required to include the WindowsPhoneReservedAppInfo.xml as described in the article above so that when we download the app we can lockdown the hardware buttons.
It's worth noting that if you don't have this file and attempt to lockdown you get the following error:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
For anyone interested in the code that does the lockdown here it is (although the code works I just thought I would try and give a bit of context):
Dim _GUID As Guid = Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetCurrentLockdownProfile()
If Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetLockdownProfileInformation(_GUID).Name <> "Associate" Then
For Each G As Guid In Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetSupportedLockdownProfiles()
If (Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.GetLockdownProfileInformation(G).Name.Equals("Associate", StringComparison.CurrentCultureIgnoreCase)) Then
Await Windows.Embedded.DeviceLockdown.DeviceLockdownProfile.ApplyLockdownProfileAsync(G)
End If
Next
End If
Catch ex As Exception
End Try
We use the role Associate in the prov.xml file. The prov.xml file does lockdown the device as we want it too and that only works if we have the WindowsPhoneReservedAppInfo.xml file as described in the MSDN article so I can't understand why we can't upload to the Windows Store.
Does anyone have any ideas on how I should be uploading our app to the Windows Store?
I've spoken with our manufacturer and they have said this:
I have a strong feeling this cannot be used in a store app due to Microsoft rules…. So it looks like you can only use this in an Enterprise signed application (Which you then side load onto the device or download using a MDM).
That being the case I will have to look into MDM.

Silverlight Exceptions on Server [duplicate]

I recently encountered a strange thing. On some of my company's servers when an exception message is printed out (yes, bad, I know. It's for debugging), the actual message isn't displayed. Instead it displays the key for an external string resource and says that "Debugging resource strings are unavailable"
After some research I've come up with the following:
In release mode, Silverlight does not package the xap with the dlls containing the actual error messages in order to save space.
I've found workarounds for OLD versions, but nothing for 4. It seems like there are Developer versions of the SL 2 and 3 runtime which will resolve the errors automatically, but I cannot find one for SL 4.
So my question is this:
What the heck do I need to do to my SL 4 app / computer to let me see the full, detailed errors when it's in release mode?
You can download the developer runtime (which contains the full exception strings) from the GetStarted page - http://www.silverlight.net/getstarted/ - search for "Developer Runtimes for Windows and OSX", it's near the bottom of the page.
Though it is too late to reply, it may help somebody else. We have a web application using Silverlight 4, installed in various test environments. This web application consumes more than one WCF services. All but one of the test environment sites consistently failed with message "Debugging Resource strings are unavailable". Agreeably the real exception was swallowed. Being a Silverlight application, there was no logging, and it always appeared that there was something failing in the Silverlight component. I connected the application in my development environment to that particular test environment, and found out that the problem was in fact in one of the WCF services. I fixed the problem at the service end and the SL component stopped having this problem.
Why was the WCF failing?
The WCF service had the following code in the constructor:
public MyService()
{
//Create an instance of Data Lookup service asycnchronously.
if (_dataLookupSrvc == null)
{
try
{
System.Threading.Tasks.Task.Factory.StartNew(() => _dataLookupSrvc = new LookupDataService.LookupDataService());
}
catch (Exception ex)
{
_log.Error<Exception>(ex);
}
}
}
Somebody moved the underlying LookupDataService.dll from the service folder causing the constructor to fail, but not right away. As the LookupDataService instance was created in anonymous method, the exception logging in this method never took place. Once the LookupDataService.dll was dropped in the service folder, the "Debugging Resource strings are unavailable" message went away.
It was a fun wild goose chase!
Have you already checked the event viewer on the machine where the application crashed? Start->Run. eventvwr