githubbob42 / mingle2github2

0 stars 1 forks source link

Blocked a frame with origin "https://www.fieldfx.com" from accessing a cross-origin frame #5726

Open githubbob42 opened 5 years ago

githubbob42 commented 5 years ago

Mingle Card: 6091 Steps to Reproduce

| | |
|-|-|
|**Version #**| |
|**Hardware**| |
|**OS**| |
|**Browser**| |
|**Username**| |
|**Password**|Use LastPass|
|ORG ID| |
|User ID| |
|RayGun Error ID| |

We are​ getting this error so frequently that we are about to blow out our RayGun quota

https://app.raygun.com/crashreporting/pianhu/errors/2266648653?dateFrom=2018-10-15T14%3A48%3A23.000Z&dateTo=2018-11-15T14%3A48%3A23.000Z

Supposedly, this was fixed in Mingle #5456 however it is still happening with Mobile v4229 (Feb 2019).

Expected Result

What should happen?

Actual Result

What actually happens?

Analysis

https://github.com/Liquidframeworks/alpine-mobile/blob/master/www/app/dashboard/sync/attachments.js#L83

This is the line of code that’s failing.  It’s on a random version.  I believe Travis Lyon, our SE, is causing it by hitting hunterpeak or something.

https://app.raygun.com/crashreporting/pianhu/errors/2266648653?dateFrom=2018-10-15T14%3A48%3A23.000Z&dateTo=2018-11-15T14%3A48%3A23.000Z#36314975629

https://github.com/Liquidframeworks/alpine-mobile/blob/master/www/app/system/appcache.js#L69

This is in 4207.   I have a feeling it’s blowing out now because chrome recently tweaked security on cached stuff.

When we try to access the document object on the cache event it throws this error.  The way to fix it is to maintain a count of outstanding cache requests.  The event handler can’t coordinate with the call for the cache so it would decrement the counter.  When the counter hits 0, we would then force reload all of the manifests….. this will usually be a wash.   The current side effect I believe is that old attachments are being removed and new attachments are not being downloaded to the mobile device.  Eventually Felix will blow out his storage from the massive number of chatter attachments.

MM 12/6: After reviewing the Header information within the RayGun error: 37409277261, I noticed that the referer value and the host value are completely different. 

When reviewing our production environment, however– these headers have the same hostname

For example:

Host should be www.fieldfx.com

Referer should be www.fieldfx.com/dashboard/sync

but in this case.. host is www.fieldfx.com and referer is https://fieldfx-8632.cloudforce.com/

This is the case everytime the error happens.

The HTTP referer (originally a misspelling of referrer) is an HTTP header field that identifies the address of the webpage (i.e. the URI or IRI) that linked to the resource being requested.

I think this is why the errors are showing up because it is happening during a sync process when observing the older errors thrown by the same user.

Related Cards

[alpine_mobile/#5456] Blocked a frame with origin "https://www.fieldfx.com" from accessing a cross-origin frame.

Impact Analysis

Developers: Fill in this area during code review.

Test Plan