I have a pretty straight forward Vue3/Vite project. It works fine with npm run dev in FF and Chrome but the production build (npm run build) with default params crashes Chrome.
The offending part is a async get info action in my Pinia store which iterates over an array to fire XHR Requests and push the result into state variables:
async getInfo() { Promises.all(someArray.map(i=>axios.get(i)) .then(res=>res.forEach(i=>this._myStateVariable.push(i.data)))
As long as I simply console.log the results, everything is running fine but as soon as I put the result in my state, everything crashes but only on Chrome and Safari and only if I use the production build from vite.
I don't believe I've got an infinite loop here since it's working fine on FF
So the question is, how do I put the results of those requests into the Pinia store without crashing Chrome?
I also tried building an array first and shoving it into the state at once:
this._myStateVariable = someArrayFromXhrData;
this.$patch(_myStateVariable:someArrayFromXhrData);
I also tried switching the build target to es2015 but no luck.
Does anyone have an idea how to get to the root of this?
Solution Turns out I did have an infinite loop since on of my methods was mutating the state. After updating Vue to the latest version it was actually reported in the Chrome console. I still find it weird that it worked and wasn't reported in FF though but whatever ...
Related
Hi so I am trying to start chrome with white tab(no graphical api) following this Google maps to 3D model tutorial and part of it instructs to inject RenderDoc into Google chrome but the injection is failing
I'm suspecting that this is what is causing the injection to fail is that chrome is loading with graphical api involved:
I made a shortcut with Target in properties holding" C:\Windows\System32\cmd.exe /c "SET RENDERDOC_HOOK_EGL=0 && START "" ^"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe^" --no-sandbox --gpu-startup-dialog""
Using it opens this
But it should be like this
And can inject into it
But when I click the ok button in the pop up "GPU starts with pid: 2408" puts me out and when I try to reinject does this
Any idea how I can fix this?
Tried different versions of RenderDoc (1.17 and 1.24), running on cmd instead of shortcut and restarting machine.
I'm going crazy with this problem....
Chrome restart several times, before restarting I noticed injection success with upper status bar visible, but when chrome restart last time injection fails.
I suspect that chrome has a system to detect injection and try several methods to block it, until a new restarted gpu process has avoided it.
I'm actually searching in this direction to solve the problem (if I'm right).
Confimation of this : https://www.securityweek.com/chrome-block-apps-injecting-its-processes/
...So I'll try a chrome version before 72 of January 2019, when chrome try to blocks all injections...
I'm using latest version of Swagger in my ASPNetCore 3.1 project and debugging on latest version of Chrome. When I try to enter swagger page it sometimes not loading and i see an empty page. It looks like totally random. It solves after I refresh the page.
I saw these errors on console.
GET https://localhost:44389/swagger/swagger-ui-bundle.js net::ERR_HTTP2_PROTOCOL_ERROR
index.html:95 Uncaught ReferenceError: SwaggerUIBundle is not defined
at window.onload (index.html:95)
File in the error is random. Its sometimes a js file, sometimes a .css file. It changes.
If I publish this project on IIS and disable Http/2 support I never encounter this error.
Why?
You can try the following:
1.Check if all your controller methods have [http] tag. If they all do and still doesn't work go to step 2
2.In your configure function to ensure that you have app.UseStaticFiles(); If it still doesn't work go to step 3
3.Uninstall and reinstall swagger. If it doesn't work go to step 4 (Core Only)
4.If you are using Core Install Microsoft.AspNetCore.StaticFiles and reference it in your project.
I encountered the same problem, SwaggerUIBundle is not defined, and the problem is not on the web app that I'm developing but on my network. The problem was resolved after I switch to another network.
I have a strange issue, we are running a asp.net core razor app.
There are no issues logging into Firefox or Edge.
But rather randomly, we have an issue in Chrome that we can't figure out.
(Random as in, it has occurred on user's machines randomly before and now it is occurring on a lot of machines, but still not all of them)
The issue is that it seems that our "auth-token" cookie is not being set.
To me, it seems that the error is with this line which runs after a successful username and password, but before a redirect.
...
Response.Cookies.Append("auth-token", inToken, option);
...
There is no error, but a line that runs almost immediately after falls over
public async Task Invoke(HttpContext context)
{
var name = "auth-token";
var cookie = context.Request.Cookies[name]; //THIS LINE DOESN'T HAVE THE COOKIE CALLED "auth-token" IN CHROME
...
}
We have tried:
Incognito Chrome/Clearing Cache/Cookies in Chrome
Restarting Machine
Uninstalling and Reinstalling chrome
Installing old versions of Chrome (chromium)
Running an old version of our code (which previously worked on chrome)
There doesn't seem to be a clear cause for when this issue occurs.
I would love to figure out why this is happening or if possible any information on how I could capture what is happening.
Thank you!
After many hours researching it seems I have finally fixed my issue.
By setting the following in our cookie
SameSite = SameSiteMode.Lax
or
SameSite = SameSiteMode.Strict
Our Chrome issues have been fixed
I was reading about Google Chrome's "SameSite" cookie options.
https://www.chromium.org/updates/same-site
Originally I thought this was unrelated as SameSite has been forced in Chrome for quite a wile now, and it has never bothered our code. But I still tried setting:
SameSite = SameSiteMode.None
To no changes
After bringing this up to my boss he informed me that he noticed an old warning that appeared in the chrome console for <1 second.
'A cookie associated with a resource at ... was set with
'SameSite=None' but without 'Secure'. It has been blocked....'
(Note: This was before I tried messing around with SameSite Options at all and was part of some code to fix a Safari bug)
So naturally we managed to capture the error with a quick screenshot and then we added in the SameSite option with Strict.
So I while it works for me now it still doesn't explain;
Why didn't it break earlier, we have been using versions of chrome with it for several months
Why does it still not break if I run an old version of the code with .net 2.1 (without any SameSite Options adjusted)
Why does our new version of the code without the adjusted SameSite option still work on some user's machines
I'm using GWT 2.7.0 with GXT 3.1.1 and IntelliJ 15.0.5 and Chrome 50. I debug my application using the Super Dev Mode (with a separate code server and bookmarklets) and up to now it's worked quite well.
However, for no apparent reason, today the Super Dev Mode has stopped working under Chrome (I can get it to work under IE 11). Everything works as before, but my *.java files are no longer visible in the Chrome Dev Tools.
I've been doing clean-and-rebuild (including cleaning gwt-unitCache), checking SO posts, reconfiguring SDM in IntelliJ, but so far nothing's helped.
Here's what I've managed to find out (inspired but this post):
Source maps are enabled
I can see source maps on gwtproject.org
In Chrome's Network tab I can see 2 requests for *.nocache.js (one to my server, the other to the code server). Neither of these requests has the X-SourceMap response header
There is NO request for gwtSourceMap.json
There is nothing interesting in the Super Dev Mode logs, this is the only reference to anything source-map-related:
Linking per-type JS with 5560 new types.
prelink JS size = 11286518
prelink sourcemap = 11286518 bytes and 260145 lines
postlink JS size = 10968640
postlink sourcemap = 10968640 bytes and 253152 lines
Source Maps Enabled
Compile of permutations succeeded
Compilation succeeded -- 34,546s
I have a separate module file for Super Dev Mode with just 1 permutation:
<set-property name="gxt.user.agent" value="chrome"/>
<set-property-fallback name="user.agent" value="safari"/>
I'm starting to run out of ideas (other than going through gwt sources), any help would be really appreciated.
I had a problem today with similar symptoms.
Eventually found that in chrome dev tool, i'd blacklisted an important gwt js file (project-0.js). I just didn't want to see it in tracebacks when i was debugging some native js stuff, but with that blacklisted, the sourcemaps weren't getting pulled in! Once I un-blacklisted it, I could once again load and debug gwt java in cdt.
I have an Ember App.
I am not sure if it is related to ember-cli-chrome add-on. I don't think so.
I was successful in deploying the chrome extension on local machine. I could also see the popup loading etc.
I am printing my environment.js "config" just to see the values, and I notice that these values are not updated based on my code base. If I run the same code in normal browser instance, it works fine.
I also notice that these environment.js contents are quite old (I had deployed the extension few days back) and seems like these values are coming from there - somehow!!! I uninstalled chrome and installed it back - no luck.
What could be happening?
Thanks