Firebase Web Init Error File Already Exists - node.js

I've installed Node.js, npm, and firebase-tools. I want to deploy a web app using Firebase hosting. I follow the documentation and do the commands as shown, but I get an unexpected error. I've posted the firebase debug log. How do I fix this?
[debug] [2019-04-20T21:08:12.230Z] ----------------------------------------------------------------------
[debug] [2019-04-20T21:08:12.233Z] Command: C:\Program Files\nodejs\node.exe C:\Users\Cameron\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js init
[debug] [2019-04-20T21:08:12.233Z] CLI Version: 6.7.0
[debug] [2019-04-20T21:08:12.233Z] Platform: win32
[debug] [2019-04-20T21:08:12.233Z] Node Version: v11.14.0
[debug] [2019-04-20T21:08:12.234Z] Time: Sat Apr 20 2019 17:08:12 GMT-0400 (Eastern Daylight Time)
[debug] [2019-04-20T21:08:12.234Z] ----------------------------------------------------------------------
[debug]
[debug] [2019-04-20T21:08:12.241Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2019-04-20T21:08:12.242Z] > authorizing via signed-in user
[info]
######## #### ######## ######## ######## ### ###### ########
## ## ## ## ## ## ## ## ## ## ##
###### ## ######## ###### ######## ######### ###### ######
## ## ## ## ## ## ## ## ## ## ##
## #### ## ## ######## ######## ## ## ###### ########
You're about to initialize a Firebase project in this directory:
C:\Users\Cameron
Before we get started, keep in mind:
* You are initializing your home directory as a Firebase project
[info]
=== Project Setup
[info]
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add,
[info] but for now we'll just set up a default project.
[info]
[debug] [2019-04-20T21:08:16.637Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] [2019-04-20T21:08:16.638Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
<request body omitted>
[debug] [2019-04-20T21:08:16.846Z] <<< HTTP RESPONSE 200
[debug] [2019-04-20T21:08:16.878Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects?page_size=100
[debug] [2019-04-20T21:08:17.215Z] <<< HTTP RESPONSE 200
[info] i Using project autoretarb (autoretarb)
[info]
=== Hosting Setup
[info]
[info] Your public directory is the folder (relative to your project directory) that
[info] will contain Hosting assets to be uploaded with firebase deploy. If you
[info] have a build process for your assets, use your build's output directory.
[info]
[debug] [2019-04-20T21:08:33.318Z] Error: EEXIST: file already exists, mkdir 'C:\Users\Cameron'
at Object.mkdirSync (fs.js:773:3)
at mkdirsSync (C:\Users\Cameron\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:22:9)
at mkdirsSync (C:\Users\Cameron\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:27:16)
at mkdirsSync (C:\Users\Cameron\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:28:9)
at mkdirsSync (C:\Users\Cameron\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:28:9)
at mkdirsSync (C:\Users\Cameron\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:28:9)
at mkdirsSync (C:\Users\Cameron\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:28:9)
at mkdirsSync (C:\Users\Cameron\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:28:9)
at mkdirsSync (C:\Users\Cameron\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:28:9)
at mkdirsSync (C:\Users\Cameron\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:28:9)
[error]
[error] Error: An unexpected error has occurred.

First of all notice the warning near the top:
Before we get started, keep in mind:
You are initializing your home directory as a Firebase project
Please be certain that you want to use your home directory as a project root. This generally is not a really good idea. It will definitely cause problems later if you want to create other projects in your home directory. Instead, I suggest you create a new directory and run firebase init from there. The CLI will want to create bunch of other files and dirs there.
Now, notice the prompt where you got the error:
Your public directory is the folder (relative to your project
directory) that will contain Hosting assets to be uploaded with
firebase deploy. If you have a build process for your assets,
use your build's output directory.
It specifically says relative to your project directory, but you gave it an absolute path "C:\Biz Drive\admin_public".
It's better to allow the Firebase CLI to create the public folder at its default location within the project folder, unless you know you have a very specific need otherwise. In order to get started, I suggest just taking the defaults, then modifying them later in firebase.json afterward.

If you are using Windows
I faced same error then I just run command prompt as admin then problem solved.

Related

azure-webapp-maven-plugin config in Azure CLI doesn't execute

I am trying to follow the steps in https://spring.io/guides/gs/spring-boot-for-azure/. Under Config and deploy the app to Azure, when I run the "mvn com.microsoft.azure:azure-webapp-maven-plugin:1.8.0:config" command, the execution starts but doesn't complete. It stops where it is supposed to take user inputs but doesn't accept any values. Please find the execution logs below -
PS C:\Users\rthan\OneDrive\Documents\code\rest-service> mvn com.microsoft.azure:azure-webapp-maven-plugin:1.8.0:config
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.rainbowhomes:rest-service >--------------------
[INFO] Building rest-service 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- azure-webapp-maven-plugin:1.8.0:config (default-cli) # rest-service ---
[WARNING] The plugin may not work if you change the os of an existing webapp.
Define value for OS(Default: Linux):
1. linux [*]
2. windows
3. docker
Not sure what caused the issue, but if you want to deploy a Spring Boot app to Azure, you could refer to this doc, I successfully deployed the application via this doc last time, see this post.

Firebase hosting : unable to verify first certificate

Is anybody here to help me with this ?
Whenever I try to initiate firebase hosting, I get this error.
Error is "Server Error. unable to verify the first certificate".
Two months passed but I haven't got the solution. Even I contacted Firebase Support Team, but they didn't help.
Please, help me.
Firebase-debug.log :
You're about to initialize a Firebase project in this directory:
F:\cv_web\build
[info]
=== Project Setup
[info]
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add,
[info] but for now we'll just set up a default project.
[info]
[debug] [2019-12-04T21:11:12.162Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects?pageSize=100
[debug] [2019-12-04T21:11:13.569Z] <<< HTTP RESPONSE 200
[info] i Using project abhijeetbharti-b42e1 (abhijeetbharti)
[info]
=== Hosting Setup
[info]
[info] Your public directory is the folder (relative to your project directory) that
[info] will contain Hosting assets to be uploaded with firebase deploy. If you
[info] have a build process for your assets, use your build's output directory.
[info]
[info] + Wrote build/404.html
[debug] [2019-12-04T21:11:25.792Z] >>> HTTP REQUEST GET https://www.gstatic.com/firebasejs/releases.json
[debug] [2019-12-04T21:11:27.490Z] Error: unable to verify the first certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34)
at TLSSocket.emit (events.js:210:5)
at TLSSocket.EventEmitter.emit (domain.js:478:20)
at TLSSocket._finishInit (_tls_wrap.js:794:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:608:12)
[error]
[error] Error: Server Error. unable to verify the first certificate

Unable to init new firebase project from console

I'm trying to host my webapp on firebase and am currently running into this issue:
My order of operations:
(in root) > npm install -g firebase-tools
> firebase login
> $ npm run build
> cd dist
> firebase init iq18
> (select my desired app in FB dropdown)
> returns: Error: An unexpected error has occurred.
No matter what I try, after running init from my /dist directory, I can not get it to actually deploy to firebase. Full error from the logs:
[info]
=== Project Setup
[info]
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add,
[info] but for now we'll just set up a default project.
[info]
[debug] [2018-06-04T19:03:39.456Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects
Mon Jun 04 2018 15:03:39 GMT-0400 (EDT)
[debug] [2018-06-04T19:03:39.812Z] <<< HTTP RESPONSE 200
[info]
=== Iq17 Setup
[debug] [2018-06-04T19:03:42.715Z] TypeError: features[nextFeature] is not a function
at init (/usr/local/lib/node_modules/firebase-tools/lib/init/index.js:13:49)
at /usr/local/lib/node_modules/firebase-tools/lib/init/index.js:14:14
at process._tickDomainCallback (internal/process/next_tick.js:135:7)
[error]
[error] Error: An unexpected error has occurred.
Things I've tried:
Deleted my /dist directory and rebuilt the app
Logged out of firebase and relogged in
Deleted the placeholder app from firebase account
Not quite sure what else I can do to fix this deploy issue.

Error uploading artifacts to coordinator

I’ve been having some fun setting up GitLab and after spending quite a while hacking away at it, I’ve become relatively used to setting it up, now having done that on two machines, the second time around with much more ease than originally…
However, I am faced with a rather large problem, on both machines: My CI pipeline is broken. Somehow, somewhere, my setup is providing a 403 to artifacts once builds are completed, meaning that each and every job that ever technically succeeds will only be doomed to fail…
I've been scavenging the interwebs for answers but I haven't found much that has been useful.
I upgraded GitLab CE to 10.1.4 minutes ago, as well as GitLab-runner to 10.1.0, the latest packages available to me through apt on the more important of the two machines, running a newer version of Ubuntu than the other - 17.04 zesty on the “beast” compared to 16.10 yakkety on “q2”.
Both gitlab-runner registrations use shell for execution.
The relevant output of the CI job is as follows:
Cloning repository...
Cloning into '/[clonepath]'...
Checking out 8319d586 as master...
Skipping Git submodules setup
mesg: ttyname failed: Inappropriate ioctl for device
mesg: ttyname failed: Inappropriate ioctl for device
mesg: ttyname failed: Inappropriate ioctl for device
$ mvn -B install
[INFO] Scanning for projects...
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.204 s
[INFO] Finished at: 2017-11-18T05:45:08+01:00
[INFO] Final Memory: 27M/640M
[INFO] ------------------------------------------------------------------------
mesg: ttyname failed: Inappropriate ioctl for device
mesg: ttyname failed: Inappropriate ioctl for device
mesg: ttyname failed: Inappropriate ioctl for device
Uploading artifacts...
target/*.jar: found 1 matching files
ERROR: Uploading artifacts to coordinator... forbidden id=35 responseStatus=403
Forbidden status=403 Forbidden token=sP9oHykF
FATAL: permission denied
ERROR: Job failed: exit status 1
I run GitLab under an Apache2 Vhost subdomain, mostly for aesthetic and omitting of the port following the host, i.e. 8080 for unicorn, since there are other sites running on Apache.
These are the configured options within my gitlab.rb:
gitlab_rails['trusted_proxies'] = [ '127.0.0.1' ]
gitlab_workhorse['listen_network'] = "tcp"
gitlab_workhorse['listen_addr'] = "127.0.0.1:8181"
nginx['enable'] = false
Setting the values in either of the following options/values as such
web_server['username'] = 'www-data'
web_server['group'] = 'www-data'
produces an error on reconfiguration:
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- package (0.1.0)
- registry (0.1.0)
- consul (0.0.0)
- gitlab (0.0.1)
- runit (0.14.2)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
* directory[/etc/gitlab] action create (up to date)
Converging 408 resources
* directory[/etc/gitlab] action create (up to date)
* directory[Create /var/opt/gitlab] action create (up to date)
* directory[/opt/gitlab/embedded/etc] action create (up to date)
* template[/opt/gitlab/embedded/etc/gitconfig] action create (up to date)
Recipe: gitlab::web-server
* group[Webserver user and group] action create (up to date)
* user[Webserver user and group] action create
================================================================================
Error executing action `create` on resource 'user[Webserver user and group]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '8'
---- Begin output of ["usermod", "-s", "/bin/false", "-d", "/var/opt/gitlab/nginx", "www-data"] ----
STDOUT:
STDERR: usermod: user www-data is currently used by process 2656
---- End output of ["usermod", "-s", "/bin/false", "-d", "/var/opt/gitlab/nginx", "www-data"] ----
Ran ["usermod", "-s", "/bin/false", "-d", "/var/opt/gitlab/nginx", "www-data"] returned 8
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/definitions/account.rb
38: user params[:name] do
39: username username
40: shell params[:shell]
41: home params[:home]
42: uid params[:uid]
43: gid params[:ugid]
44: system params[:system]
45: supports params[:user_supports]
46: action params[:action]
47: end
48: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/definitions/account.rb:38 :in `block in from_file'
user("Webserver user and group") do
params {:action=>nil, :username=>"www-data", :uid=>nil, :ugid=>"www-data", :groupname=>"www-data", :gid=>nil, :shell=>"/bin/false", :home=>"/var/opt/gitlab/nginx", :system=>true, :append_to_group=>true, :group_members=>["www-data"], :user_supports=>{:manage_home=>false}, :manage=>true, :name=>"Webserver user and group"}
action [:create]
supports {:manage_home=>false}
retries 0
retry_delay 2
default_guard_interpreter :default
username "www-data"
gid 33
home "/var/opt/gitlab/nginx"
shell "/bin/false"
system true
iterations 27855
declared_type :user
cookbook_name "gitlab"
recipe_name "web-server"
end
Platform:
---------
x86_64-linux
Running handlers:
Running handlers complete
Chef Client failed. 0 resources updated in 04 seconds
And as for Apache, here’s the SSL-enabled Vhost:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName [host]
ServerAdmin [email]
DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public
ServerSignature Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
<Location />
Order deny,allow
Allow from all
Require all granted
ProxyPassReverse http://127.0.0.1:8181/
ProxyPassReverse http://[host]/
RequestHeader set X-Forwarded-Ssl 'on'
</Location>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]
SSLCertificateFile /etc/letsencrypt/live/[host]/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/[host]/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
Any idea what’s going on? I haven’t dug the Apache log information yet since it probably won’t be Apache as the request goes straight to gitlab-worker (8181). What logs should I check for that, if necessary?
Thankyou for your time.
This isn't a particularly helpful answer, as the solution has little explanation for its workings.
The configurations I had have remained the same as per above, but the runner I had installed, I removed the config of, rm /etc/gitlab-runner/config.toml, and then proceeded to remove the package from the machine, apt purge gitlab-runner. (gitlab-ci-multi-runner is another package that is available but does not appear to be up to date with GitLab 10 - returns a 404 rather than connecting to the node).
I reinstalled the runner, apt install gitlab-runner, and then registered it - gitlab-runner register. The key thing to note here is that during registration, I used my FQDN, as in https://git.example.com rather than any local address such as http://localhost:8080 or http://localhost:8181 (unicorn, gitlab-workhorse, respectively). And yes, I am running my runners on my local machine. Hazardous, but I have too much trust in my team. That may be our downfall, ignorant systems administration is key to success.

Connecting Blob to Spark failing

I am trying to connect spark coming in Hortonworks 2.4 distribution to Azure Blob storage and I was getting error "wasb filesystem not recognized " . I checked and many suggested downloading azure-sdk-for-java and creating package.
I am trying to create package using mvn but while running both mvn test and mvn package ; the process is getting hanged while testing. There is no error given , it just failed to return anything. I had changed testconfiguration.xml to reflect my blob account name. Below is the log files I am getting.
Is there something else that needs to be done to get jars ?
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Microsoft Azure Storage Client SDK 4.3.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # azure-storage ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/adminhorton/kspark/azure-storage-java-master/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # azure-storage ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) # azure-storage ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # azure-storage ---
[INFO] Compiling 52 source files to /home/adminhorton/kspark/azure-storage-java-master/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.13:test (default-test) # azure-storage ---
[INFO] Surefire report directory: /home/adminhorton/kspark/azure-storage-java-master/target/surefire-reports
T E S T S
parallel='classes', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
Running com.microsoft.azure.storage.StorageAccountTests
Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.057 sec
Running com.microsoft.azure.storage.StorageUriTests
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.071 sec
com.microsoft.azure.storage.StorageAccountTests.txt
com.microsoft.azure.storage.StorageUriTests.txt
com.microsoft.azure.storage.StorageAccountTests.txt
com.microsoft.azure.storage.StorageUriTests.txt
According to your description, I am not sure you have configured your Storage Configuration rightly in your project. So I recommend you can follow these steps to check your configurations:
1.Create your Azure storage Account and set it in core-site.xml as this format:
<property>
<name>fs.azure.account.key.youraccount.blob.core.windows.net</name>
<value>YOUR ACCESS KEY</value>
</property>
2.Restart the HDP service and use the Hadoop fs –ls wasb://**.blob.core.windows.net/ to list the files in the container.
I strongly recommend you can refer to this blog how-to-configure-hortonworks-hdp-to-access-azure-windows-storage and official document.
Meanwhile , #Yuval provided the great sample about how to connect to Azure blob with Java SDK.

Resources