I have a Meteor app deployed on AWS using database from mongodb.com, and it's working fine.
now I want to be able to work with the same database instead of local when I run my app locally for development (along with my settings.json). I tried everything but the problem is all solutions work on none Windows machines.
here is the latest command I tried but nothing happens:
set MONGO_URL=mongodb://<username>:<password>#<mydatabase>.mongodb.net:27017/meteor meteor --settings settings.json
what's the solution?
I ran into this issue as well, the solution that worked for me was to create a BAT file within the root project folder containing the full run command for Meteor.
In the root directory create a bat file such as run.bat
Edit the BAT file to contain your Meteor start command:
SET MONGO_URL=mongodb+srv://username:password#production.mongodb.net/root meteor run --settings settings.json
Run the file.
I'm using Gradle to build a java project.
When I run any task (assemble, test).
I get randomly an error :
Could not create service of type FileHasher using
GradleUserHomeScopeServices.createCachingFileHasher()
Did any one had the same issue before?
Gradle V:3.5
java 8
I'm using the java plugin.
Thanks,
I was facing the same because I accidentally hit ctrl+z during build, and then the error was the same as yours.
I tried to remove the lock file but it didn't solve the problem.
Then I find all the process related to gradle by ps aux | grep gradle, and then kill -9 <pid> them all. The build backed to normal.
In your terminal type this:
./gradlew build
and the outcome would be:
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type FileHasher using GradleUserHomeScopeServices.createCachingFileHasher().
> Timeout waiting to lock file hash cache (/Users/zra/.gradle/caches/4.1-rc-1/fileHashes). It is currently in use by another Gradle instance.
Owner PID: 17571
Our PID: 26055
Owner Operation:
Our operation:
Lock file: /Users/xxx/.gradle/caches/4.1-rc-1/fileHashes/fileHashes.lock
now do:
rm /Users/xxx/.gradle/caches/4.1-rc-1/fileHashes/fileHashes.lock
and build again.
P.S replace xxx with whatever username you've.
What worked for me was removing the lock file like suggested in the answer above: rm /Users/xxx/.gradle/caches/4.1-rc-1/fileHashes/fileHashes.lock and also killing the IDLE processes by running the command
./gradlew --status
It generates a list of gradle processes with status like
PID STATUS INFO
23580 IDLE 5.2.1
23860 IDLE 5.2.1
19058 STOPPED (stop command received)
Then kill one of the idle processes by kill <PID> and run the gradle build again.
One simple cause is that gradle daemon is not started with the same environment variable.
I had the same issue while changing the gradle user home.
Simply stop the daemon:
gradle --stop
change the ownership of .gradle/ using the following command:
sudo chown -R <USERNAME> .gradle/
I couldn't find this info elsewhere, posting in case it helps someone:
I had the same issue while running Android Studio on ChromeOS (on Chromebook).
I had shared a Google Drive folder with Linux (by selecting a folder, right-clicking and selecting Share with Linux) and created my project there. Build failed with this error, and removing the lock file did nothing for me.
Problem was resolved for me by re-creating the project under a 'Linux folder'.
If the OS is Windows.
Try this: gradlew build
Find de PID Process
And in CMD execute this command
TASKKILL /F /PID #PID
In my case, I was keeping the entire project in a folder managed by Google Drive Stream. Since that's a very rudimentary filesystem, Android Studio (or Git or Gradle, I can't tell which) was trying to do something on the FS that Google Drive Stream doesn't allow.
I simply moved the project onto my local drive and that fixed it!
I got the same error when I tried to execute ./gradlew from WSL2 ubuntu.
As suggested by #user16115, I stopped the running gradle in my host machine (windows machine) by issuing command gradlew.bat --stop.
After stopping the gradle in my host machine, I issued the same command ./gradlew in WSL2, gradle worked as expected.
ps: I have mounted my C:/ drive into WSL2 ubuntu.
This was same problem for me before some days and now only it's your or the user reading this solution.
Uninstall full android studio (means- 'after uninstall from control panel, delete folders of Android Studio,')
folders to be deleted:
C:\Program Files -> Android,
C:\Users{user folder name} -> .android & .gradle & {other folders related to Android Studio}
Reinstall form it's .exe and make sure your PC in connected with internet and with proper speed.
Download all SDK files as mention in that and keep downloading in Android Studio only. [do not download form other source- otherwise it will show errors, be careful]
Click on new project and select empty project and give the name and click on finish.
you will redirect to another window and than the main thing starts that is installation of GRADLE so for this you should have high connectivity of internet and that it will download automatically and and and now your are ready to go.
I had the same issue and the solution was to login with the correct user and then run gradle. I was logged in with a user that didn't had rights to run the tasks.
I just moved a project from Download folder (on Mac) to another one
If you try to build an inner project - try to go to root project and call
./gradlew <moduleName>:<command>
The easiest solution in my case wast to run
In case of linux
sudo ./gradlew bundleRelease
if windows then login with the user who has highest privileges.
Because this error occurred due to insufficient permissions
I am new to using Android Studio, also new to using mac os and new to using realm.
My problem is I need to view my realm DB using the realm monitor for mac os, to do that I need to extract the DB file from my emulator using the terminal inside android studio, but I can't because I need to configure the system variables, I tried to do that using the mac os terminal but it didn't work, I searched and tried many tips online but got nothing.
If anyone can give me a detailed step by step guide to do this it will be very appreciated.
edit:
I need to view the realm DB file from my android application, I tried the solution in this link
How to view my Realm file in the Realm Browser?
so I need to extract the realm file from the emulator using the adb command, I tried that using the android studio terminal but could not recognize the adb command, after some research I found this links
Not able to access adb in OS X through Terminal, "command not found"
and
Setting ANDROID_HOME enviromental variable on Mac OS X
So I need to define ANDROID_HOME environment variable and path using mac terminal. I tried that - I opened mac terminal and wrote the following command directly:
export ANDROID_HOME=/Users/apple/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Then I opened the android studio terminal and tried to use adb command but still not found, then reopened mac terminal and wrote the following command: echo $ANDROID_HOME to check the value but I got nothing.
It seems I am missing something here I don't know what it is.
The path of my android sdk file is: /Users/apple/Library/Android/sdk
First Things First
You want to view your database information using Realm Browser.
In order to do so, you will need to extract the .realm file (the file that stores your realm database) from your android phone or emulator.
It seems like you need to define adb in your macOS environmental variables so you will be able to execute the suitable command to extract the file, as mentioned above.
Including adb as an Environmental Variable on macOS
In order to include adb command as an environmental variable you will need to do the following:
First, you need to open Terminal and type open ~/.bash_profile and then press enter.
You will be prompted with the TextEdit app with the .bash_profile file.
You need to add adb to the PATH in that file.
Copy the following to the file and save it (cmd + S):
#set adb:
ADB=/Users/YOUR_USERNAME/Library/Android/sdk/platform-tools
export ADB
#set PATH:
PATH=$PATH:$ADB
export PATH
Close the file, log out from your user (Apple menu => Log out) and then log in again.
In order to check that your PATH now contains the adb command, you can open Terminal and type echo $PATH. Now you should see your adb path as well.
You can also enter an adb command to see if you can run one (such as adb devices).
Extracting the realm File From Your Android Phone/Emulator
Realm Browser doesn't support accessing the existing databases on your device directly from the device itself.
There are three options to view a database on Realm Browser:
Open Realm File
Open Realm URL
Connect to Object Server
If you wish to view an existing database on your device, only the first option is relevant to you in that case. You will need to copy the database from the phone/emulator to your computer so you can view it.
In order to extract the database file from the device, please follow this:
Open Terminal, then navigate to a folder in which you would like to
save the database file. Navigate to that folder using the cd command.
For example, if you wish to save it to a folder "realmDB" on your desktop you need to type cd /Users/YOUR_USERNAME/Desktop/realmDB/.
Then type adb pull /data/data/APPLICATION_ID/files/ .
(where your applicationID can be found inside the build.gradle file under the defaultConfig block)
This will pull all realm files to that folder, where the database file is usually saved under the name default.realm. Now you can open that file using Realm Browser and see your database.
Note that the adb pull will only work on an emulator or on a rooted device.
Another possible solution suggested on one of the links you mentioned on your question is to use Stetho with realm plugin for Stetho in order to view your realm database.
That answer suggested installing and defining Stetho and then viewing the database file through chrome://inspect page under Resources => Web Sql => default.realm instead of viewing it using Realm Browser.
You can try that one too if you don't want to pull your database file for every change you make.
I am running a on-commit Bot to build, analyze, unit tes and archive my App and it works perfectly.
I have a script (*.sh) in my porject that I want to run at the end of a success analysis. I am using xcode 7.3 now and i tried the following:
In the trigger section call ./myscript.sh, but the bot could not find it.
I tried to add $SCROOT, still no luck
I tried to copy the script to bin but since the bot runs under that __xcbuild user it did not see it, and I do not want to mess with adding permission to /bin and /usr/bin
All I want is to run a script against the code the that the bot just pulled on success.
The source used by Xcode CI will be under a cache folder stored in an environment variable called:
$XCS_SOURCE_DIR
Your file should be somewhere under that path
Trying to incorporate Continuous Integration into my Xcode builds.
I have setup OS X Server on my MacBook and everything seems to work fine except for the actual submit/upload script for Crashlytics.
I am getting this error in the 'Trigger' log:
/var/folders/1d/5y5tn0hd1qj01wbxgd3sxrs4000086/T/EFFB7FF5-CFF5-41CF-8AEB-D8813069D831-16127-000004A29A1D79A7: line 2: /Crashlytics.framework/submit: No such file or directory
Couple things to note:
I am able to manually archive/distribute my builds through Crashlytics without any problems.
Crashlytics is installed via PODS and my Run Script looks like this (with my real keys obviously):
${PODS_ROOT}/Crashlytics.framework/submit MYAPIKEY MYCLIENTKEY -emails myEmail#myEmail.com -notesPath ~/Notes/ReleaseNotes.txt -groupAliases myGroupAlias -notifications YES
${PODS_ROOT} is not available to the post trigger action.
You should use
${XCS_SOURCE_DIR}/*RepoName*/Pods/Crashlytics/Crashlytics.framework/submit etc
Where *RepoName* is the name of your repo. Sadly, I haven't been able to find a env variable for it or something.