I'm using Expo Go for a React Native project, which isn't really relevant except for the fact that the app preview refreshes every time a file in the project is changed.
Lately, when previewing the app, it would refresh randomly and incessantly (sometimes 10 times in a second, sometimes go a minute without any refresh, seemingly completely random). Presumably files are changing in the background, but no IDEs are open (i'm just running the command from the terminal) so I have no idea what could be modifying these files.
In addition, this problem just started recently but I've been working on this project which has been in the same directory for months. So I don't think it's something with the file system.
Is there any way for me to debug this issue? Like, for example, a way to see which files are being changed live?
Related
I've been using my own hand-rolled solution (outside of Webpack) for taking a folder of SVG files, extracting out the contents between <svg></svg>, building a JSON file, and then using that to inject into a React component so I can output specific icons with more control over the surrounding attributes.
I came across https://github.com/gilesa/svg-to-json-webpack-plugin which actually does a lot of the same for me, which is awesome! Something odd happened though when attempting to use it with create-react-app and what I suspect is the Webpack dev server. Whenever I attempt to import the generated .json file, the dev server continually refreshes in the browser.
I go into detail a bit more in the issue I created https://github.com/gilesa/svg-to-json-webpack-plugin/issues/1 but my attempts at debugging exactly what's causing the infinite loop haven't been successful. The Webpack plugin API is pretty great, so I've learned a bit along the way, but no dice thusfar.
Ideally, I'd want Webpack to ignore that specific file if that is what's causing the watcher to kick-off again. Potentially because it's creating a file in the same src directory it is looking for changes to? Thanks for any help in the right direction!
this sounds like a known issuse of #25, try this webpack plugin webpack-mild-compile, it should works.
I have a Java/Spring MVC WebApp using Angular as the Front End. The ui application is deployed as part of the web app in the src>main>webapp folder. The problem is when I make any changes in the CSS or HTML files, the same are not reflected instantaneously. I have tried clearing cache and hard resetting also but to no avail.
I tried running the app in incognito mode too but it does not work.
Please help.
Specific resources can be reloaded individually if you change the date and time on your files on the server. "Clearing cache" is not as easy as it should be. Instead of clearing cache on my browsers, I realized that "touching" the server files cached will actually change the date and time of the source file cached on the server (Tested on Edge, Chrome and Firefox) and most browsers will automatically download the most current fresh copy of whats on your server (code, graphics any multimedia too). I suggest you just copy the most current scripts on the server and "do the touch thing" solution before your program runs, so it will change the date of all your problem files to a most current date and time, then it downloads a fresh copy to your browser:
<?php
touch('/www/sample/file1.css');
touch('/www/sample/file2.css');
touch('/www/sample/file2.css');
?>
then ... the rest of your program...
It took me some time to resolve this issue (as many browsers act differently to different commands, but they all check time of files and compare to your downloaded copy in your browser, if different date and time, will do the refresh), If you can't go the supposed right way, there is always another usable and better solution to it. Best Regards and happy camping. By the way touch(); or alternatives work in many programming languages inclusive in javascript bash sh php and you can include or call them in html.
Bear with a bit me before jumping straight to the normal caching fix solutions. Here's what happening:
I have a project, a single project out of dozens in our solution that appears to be refusing to update its code when I build and run. It's not part of the xap, but a dll sitting along side the xap.
Things I've already determined not a solution:
I've checked the output of its dll and it has been built, and its contents updated to match my code, verified with dotPeek. But it refuses to display the updated code.
I clean, rebuild the solution, and restart the dev server but it refuses to display the updated code.
I switch to a different browser, no dice.
I clear browser cache's to no avail.
I completely delete my local code and do a fresh fetch from our repository, again, no love from silverlight.
I have not been without a little success though. The ONE bone I've been thrown was over the weekend. Not touching it for a couple days, I came back to work on Monday and, without having done anything to it, it just updated. Now, however, it's cached again, or something, because it's stuck in the last set of changes I made to it.
So my question is this: What am I missing?
Most likely your files may be read only and MS Build fails to display error message and it does not update files. In case if you have mistakenly checked in your .xap files, then this is possible, you will have to remove it from your source control and also make .xap file writable by removing readonly checkbox.
Visual Studio checks in your .xap files by mistake and silverlight build does not report any error.
Second, do you have any other file backup service installed like Shadow copy or Dropbox kind of online backup service, something is probably making xap files readonly and that is causing this problem.
Here there are couple answers: Prevent Silverlight 3 from caching while debugging
Code below helped me(add this to Page_Load of page that hosted the app ):
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-100));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
UPDATE:
Prevent Silverlight xap from being cached by proxy server
"So my question is this: What am I missing?"
An internal caching mechanism that our application uses. So, none of you could really have helped me as it was an architectural feature of our software.
I am struggling to make a SqlCE local database to work in my winforms project.
I`m used to work with web app, this is my first desktop app, and after understand a lot of tricks like when you insert data in your local database while debugging, the data goes to a magic database inside bin/debug folder - that I would never wonder by myself - and from yesterday to now, I launch my project again, and guess what the new trick? The database got lost ¬¬ !!
Suddenly my project can't recognize its own path to the database and it throws me an error: "The path is not from a legal form", I SWEAR I didn't move the mouse from yesterday when it was working from now.
Anyway, SqlCE gave me a lot of headaches already, I'm doing this project as a favor to a bookstore inside a charity house and I'd like this project gets only one weekend - it already didn't.
So, as I don`t have a big amount of data to store, what would be the alternatives to store this data without a .sdf file?
If you want to stay with SQL I would recommend SQLite. Small, lightweight and results are placed in a single file.
http://sqlite.org/
I have an ASP.NET app in which I've used Vertigo's SlideShow 2 silverlight image gallery component. All was working well and the app went through testing and suddenly, after a recent deployment I get an alert box that says:
IMPORTANT: Remove this line from json2.js before deployment.
This pops up after the Silverlight component loads but then the SlideShow2 xap file seems to work fine after that.
Anyone have any ideas on why this would just start happening? I've done some research and can't come up with much and it's pretty mysterious that it just started happening. I've not directly used json2.js in this application nor have I customized the Slideshow 2 component in any way.
It also happens both in my dev and production environments.
-Kevin
Something like this?
From http://tech.groups.yahoo.com/group/json/message/1413:
Thu Dec 10, 2009 5:23 am
The server at JSON.org is getting
hammered. It turns out that there are
some sites that are linking directly
to json2.js instead of dispensing it
from their own servers. By far the
heaviest impact is from
onlinebootycall.com. My intention was
to provide the world with a free
implementation, but the world can buy
its own bandwidth.
So I have added this line as the first
line in the json2.js file:
alert('IMPORTANT: Remove this line
from json2.js before deployment.');
It will not break anything, but it
should help get a message to the
onlinebootycalls that you should not
load code from strange third party
servers. It is not safe.
- "Douglas Crockford" <douglas#...>
Don't link to json.js OR json2.js directly from json.org. It is bad etiquette, it uses their bandwidth for your site.
Copy the file to your own server, remove the line, and redeploy.
p.s. what are you using silverlight for at onlinebootycall.com? Curious... ;)
In doing more research (and taking a step back to evaluate my environment), the implementation of SlideShow2 I am using is a modified one from an opensource CodePlex project. This particular version supports streaming images and albums from Picasa's web albums. The version I'm using is located here: http://slideshow2picasa.codeplex.com/. In checking out their online dmeos they exhibit the same behavior so obviously this implementation is linking to the json2.js file on your servers as a means to interact with Picasa web.
Today I'll take at their code and see if I can rely on a local copy fo json2.js.
Thanks for helping me out.