I've recently noticed my build time has increased considerably, sometimes taking a full minute to load. On the console I still see "Building JavaScript bundle: finished" fairly quickly but the screen takes much longer to refresh. Is there a reason something like this would be happening?
Try using Expo in a Simulator on your development machine and determine if it is taking as long as on your device:
If it is faster than on your test device, then you should check the
network connection on your test device
If it is as slow as on the test device, then you could try to remove node_modules and reinstall them with 'npm install' or 'yarn'. Expo will be redownloaded aswell as all other packages.
In my case, it was a different solution.
I followed the instructions given by jimmylee on the Expo SDK forums, which say:
If you are behind a VPN, try disabling the VPN.
If you are using windows 10, run CMD on your machine and type
ipconfig. Take a look at the first Ethernet Adapter. If it doesn’t say
Ethernet Adapter Ethernet it means Expo is taking the IP address of
something else.
To fix this, go to network connections and disable the adapter that it
should not be pointing at.
Connect your computer to the network and your phone to the same
network. Restart Expo.
So, go to Settings > Network & Internet.
Click Change Adapter Options:
Then disable the unneeded Ethernet:
Then restart Expo.
If the connection is made but bundle building is very slow - Try disconnecting from the network both devices, the system and the mobile, and reconnect. Also, don't forget to clear the 'recently in development' projects and start the project again.
It will certainly increase the speed of building by far, especially for windows it works very well.
I was going through the same problem.
I used expo on multiple devices and clearly it depends on the device also, i.e, whether it is able to handle it or not.
Second, for the slow device, i came up with a solution.
I just turned off the fast Refresh.
Fast Refresh keeps a watch on the development side and keeps reloading whenever we make a change.
By deactivating it, we need to refresh the app on our own. But this helped me.
Due to multiple refreshes and continuous bundling, expo gets slow (as per me) thus disabling this feature may help (infact helped me a lot).
STEPS TO DO THAT;
In your expo go app, shake your device. An option panel will open.
There will be an option to disable fast refresh. Simply click that and you are done.
Related
I successfully run the react-native app and emulator also opended.
I'm also getting emulator loading message too
However After that it crashes and nothing display
And I'm getting an error when reload the bundle as below
I'm unable to figure out the issue since I'm a react-native beginner.
Appreciate your suggestions
It seems your emulator not connected to your react-native development server. Sometimes it happen, devices connected and somehow it lost connection with the development server. Try running adb devices command on your terminal to check is your emulator available and detected.
I know this is old but maybe this will help someone else.
This could be happening due to several reasons.
Check emulator is working or if its storage is full? wipe the data.
Syntax error could be because of this. please recheck latest changes files.
Personally, I was stuck due to a small comma error in my code.
I have a react web app and a react-native mobile app. I want to add a "Slow Internet Connection Detected!" warning whenever the users network connection is slow.
Checking the speed at one instant is fine (By checking the time taken to complete a download of known size).
I want to detect the internet speed of the user at all times such that whenever the speed drops the warning comes on.
I am not able to find a way to do that. Please suggest a solution.
Looked here first on how to do that and found a lot of references but not up-to-date (windows 10)
Tried "net start usbstor" but that is not supported it seems.
It appears I need devcon.exe which is part of a huge windows 10 sdk download includeing visual studio
This is my problem, maybe there is another solution:
I have a number of USB 3 external drives they are not used all the time so they go to sleep (the drives, not the computer). This is fine but occasionally one or more of them never wake up when I tried to access them. They are on a server and I access them through the file manager on my desktop. When they do not wake up I have to use remote desktop to run "device manager" and disable "Renesas USB 3.0 eXtensible..." and then enable that host controller. Immediately, all the sleeping drives wake up. I would like to run a program from the command prompt preferably from my desktop and not have to log in using splashtop or VNC. From googleing it seem devcon needs to be on that server.
Maybe there is a service I can start or stop remotely? I did not see usbstor listed as a service.
Thanks for looking!
[EDIT] Wanted to to follow up on this post. I read harvey263 suggestion but I decided I wanted the disks to sleep as they are used rarely and I have no interested in buying a 2TB replacement disk anytime soon. However, I did want to post about that devcon program. I was unable to located the device kit for win10. It was not in
Directory of C:\Program Files (x86)\Microsoft SDKs
after downloading a huge amount of stuff I did not need, but I discovered that splashtop remote (or server which I already had in all my systems) includes devcon support in its free download and the program is tiny and easy to install. I did have to move their devcon support from
C:\Program Files (x86)\Splashtop\Splashtop Remote\Server\Driver\Monitor\utils
into my personal download directory as I wanted to execute it upon login and I could not do that from the task scheduler on account of permissions or authorizations. For example, I put
devcon64.exe remove "PCI\VEN_10DE&DEV_026D*"
devcon64.exe rescan
into a task executed once on startup and it disabled the USB controller connected to the drives and then re-scanned, reinstalling the driver and wakening the drives. It also removed the yellow bang that was always on the driver every time I rebooted.
You might be able to alleviate the sleep issue by changing the USB setting in Advanced Power Options (control powercfg.cpl,,1). I think "selective suspend" is normally Enabled by default.
For devcon.exe you only need to download the Windows Driver Kit. It's not that big and you can copy devcon.exe out to run standalone and uninstall the rest if you want. I have scripted devcon to "re-enable" a device like this:
devcon disable *ROOT\NDISVIRTUALBUS*
timeout /t 5 /nobreak
devcon enable *ROOT\NDISVIRTUALBUS*
You could put this in say "\\RemotePC\c$\Scripts\EnableUSB.bat". Then call it with psexec like lit mentioned:
psexec \\RemotePC cmd /c ("C:\Scripts\EnableUSB.bat")
I want to run JS code on Safari (iOS) or Chrome (Android) to detect for example, if WhatsApp is installed on the device.
I played with:
How to check if an app is installed from a web-page on an iPhone?
and
https://github.com/hampusohlsson/browser-deeplink
But the problem is that if the app is installed on the device - the browser re-directs to the app. I want to stay on the page after the "detection stage", is that possible to do?
Following a few hours of research + consulting with top experts I came to the conclusion that there is no legitimate way of achieving the goal of detecting whether a specific app is installed on the device without having the browser re-direct to the app if it is installed.
In iOS for example, there was an app just removed from the App Store because of violating the rules: SysSecInfo. The app managed to pull list of all running processes for example.
From: https://www.sektioneins.de/en/blog/16-05-09-system-and-security-info.html
See https://developer.apple.com/videos/play/wwdc2015/703/ "App
Detection" starting at 08:34
During this talk they discuss several APIs used to gather information
about processes currently running on your system (around 12:12 in the
video) and claimed to have fixed them. However as so often Apple has
only partially fixed the problems they claim to have fixed. Therefore
they have actually never stopped malicious applications from gathering
information about what other applications run currently on your
device, but only removed access to detail information that is only
relevant for harmless system information tools anyway.
System and Security Info is therefore still able to show the list of
running processes and enriches this list with information from the
codesigning information including the list of entitlements running
processes have.
Description
Specs: Chrome version 44,45,46 both Win, Mac and Linux.
Actions made:
first source: camera and microphone granted via getUserMedia
second source: microphone only granted via getUserMedia
both sources are stored in JS object
volume level checked with WebAudio (getting peak level over 5 seconds) 3) WebRTC call
established within a first source
Symptoms:
volume level is detected as 0
in the WebRTC call one user doesn't hear the Chrome user
Expected behavior:
volume level is detected higher than 0
in the WebRTC call both users hear each other
Severity: often, but not always. Doesn't seem to be tied to particular user, it happens from day to day with any user.
(!) Can sometimes be temporary fixed by restarting Chrome completely.
(!) Can sometimes be temporary fixed on Mac (until restart):
Go to Mac Applications > Utilities > Terminal
Copy and paste this command, then press Enter: sudo killall VDCAssistant
Type in your computer password and press Enter
Restart Chrome
(!) Happened even with the only one source requested.
Help
This seems to be a massive issue addressed to Google a long time ago, but still not solved. Have anyone faced it? Is there any way to fix this in JavaScript or anyhow else?
Edit 1
It is also reproducible at https://apprtc.appspot.com/ and any other webrtc websites.
Edit 2
Seems like it is WebRTC bug:
https://code.google.com/p/webrtc/issues/detail?id=4799
https://code.google.com/p/webrtc/issues/detail?id=5175
Here is a script I have in my .profile that will resolve this issue:
alias fixcam="sudo kill -9 `pgrep VDCAssistant`; sudo killall coreaudiod"
Then I just run fixcam from terminal. If you add the above command to your .profile you'll need to open a new terminal window or run source ~/.profile to reload the configuration.
It looks like the bug has been isolated to coreaudiod getting in a bad state. I haven't tested ONLY restarting coreaudiod but it's possible that will work also.