Laravel Spark installation issue - dont download spark forbidden access - laravel

I have a Laravel Spark Account with a token registred.
I have install laravel spark installer but failed to create a new project.
When i launch the command spark new myproject
I have this :
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
Application ready! Build something amazing.
Downloading Spark...
In RequestException.php line 113:
Client error: GET https://spark.laravel.com/api/releases/7.0.0/download?api_token=vFhBeFakargKjmIoVT4w8JEkajHsenk2W69wyg3qJ0C6 wcTNH6VqxrXWf17t resulted in a 403 Forbidden response:
{
"message": ""
}
new [--braintree] [--team-billing] [--] <name>
The token referenced has been checked.
Why doesn't it allow me to download Laravel Spark?

First things first, generate a new token. I'm pretty sure you've pasted your real token (hopefully not) which could be used by anyone reading this...
Go here and delete/recreate a fresh token as soon as possible
https://spark.laravel.com/settings#/api
If that error doesn't actually contain your real token, you can check what token you are using by doing:
$ spark token
This should spit out your current token. In the error you pasted, the token looks like it has a lot of space in it, which won't work. See if $ spark token shows the same spaces. It shouldn't... If it does, set your token again (with no spaces!)
$ spark register your-token-here
If this still doesn't work, remember that spark is a paid service. Utilize the support they offer and hopefully you'll get a response back quickly

Related

NEAR dev-deploy fails with Error: Can not sign transactions no matching key pair found

Using a freshly created create-near-app I am trying to dev-deploy and getting this error:
Starting deployment. Account id: dev-1635099366550-3101206, node: https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file: out/main.wasm
An error occured
Error: Can not sign transactions for account dev-1635099366550-3101206 on network testnet, no matching key pair found in InMemorySigner(MergeKeyStore(UnencryptedFileSystemKeyStore(/Users/<username>/.near-credentials), UnencryptedFileSystemKeyStore(/Users/<username>/Documents/Projects/new_test_app/neardev))).
I'm unsure what's causing it or what needs to be done to resolve it. I've checked the /Users/<username>/.near-credentials credentials directory and there is a .json file containing credentials. I tried near clean & rebuilding, ensured I had done near login even tried with sudo thinking it might be a permissions error.
I don't have a reason for the "why" behind this happening, but eventually I tried deleting the dev-1635099366550-3101206.json file in /Users/<username>/.near-credentials (the first dev account it created) and then re-ran near dev-deploy.
This created a new dev account and seemed to work fine. Re-running near dev-deploy after that also seemed to work fine, redeploying the contract to the same account.
I got the same problem and I tried to open the web on another web browser, the problem disappeared.
[UPDATE]
I clean the browser local storage and import the wallet again, everything works fine.
Use NEAR connected account interface instead.
You can read more at here : https://near.github.io/near-api-js/classes/walletaccount.connectedwalletaccount.html

"~" symbol created automatically after running project with service worker

My project is a simple login page. I am using asp.net core with MVC.
Everything was working well and I wanted to add service worker to my project. I followed the known steps. Add a manifest.json file in wwwroot, fill it correctly and add this function services.AddProgressiveWebApp(); after services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);.
When others do these steps, service worker works properly. When I run it (IIS Express), service worker produces an error: "Uncaught (in promise) TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script."
Then I realized this thing: https://localhost:44331/~/serviceworker.
The ~ symbol is created automatically and I am not knowing how to remove it.
The following https://localhost:44331/serviceworker works.
Help?
It is solved.
I updated the version from v1.0.42 to v.1.0.33 and it worked.
v1.0.42 has a bug.

The last request was denied because it contained an invalid security token

When uploading a large file, I'm getting this error message in Joomla:
The last request was denied because it contained an invalid security token. Please refresh the page and try again.
This error message occurs if you use a PHP version higher than the original script. Solution could be to update the component responsible for uploading the file (if an update is available) or downgrading the PHP version used - But if you use Joomla 3.8 you cannot downgrade as you will need the 7 version.

Google Sheets API Java program, works on one machine and not the other - 401 Au

I've got a working basic Java App that uploads some data to a google sheets file of mine.
I uploaded it to a git client, pulled it to my other computer, and it doesn't work on that with a 401
Exception in thread "main" com.google.api.client.auth.oauth2.TokenResponseException: 401 Unauthorized
at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
at com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
at App.main(App.java:71)
Any idea what could be different between the two machines? I understand it that if I'm using the same client_secret.json, it should be irrelevant which machine I'm on?
UDPATE 1:
ok, some extra info - i just tried my project at work on my work laptop and it worked fine! On first run it opened a browser window and asked me which google account I wanted to use, I chose the correct one, and that worked. On the laptop I have that didn't work, I wasn't given that option (that I remember) so how can I reset the google account that has been used to authenticate against?
I saw this in my cmd line
Please open the following address in your browser:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=blah-notputtingmyrealid.apps.googleusercontent.com&redirect_uri=http://localhost:42299/Callback&response_type=code&scope=https://www.googleapis.com/auth/spreadsheets
Attempting to open that address in the default browser now...
Since it's working on your previous computer, the issue might be concerning the location of your client_secret.json. If you check the Java Quickstart setup, there's a part where you need to download the JSON file and place it on your working directory. Since, you're on a new machine, that file is now missing.
g. Click the file_download (Download JSON) button to the right of the
client ID.
h. Move this file to your working directory and rename it
client_secret.json.
Or the access token has expired.

Hyperledger-Composer REST Authentication

Request assistance with hyperledger composer. I have created a network and web app around the REST API that was built with the composer-rest-server. I am able to add participants, assets and execute transaction with the default settings. I am now trying to add authentication to the REST server as well as add identities to new participants. However I got stuck. I have reviewed the information at
https://hyperledger.github.io/composer/integrating/enabling-rest-authentication.html
But I'm not sure where I should place the export COMPOSER_PROVIDERS='{.... information to continue the setup.
Any assistance, tips and tricks are much appreciated.
Ok so I figured it out. The problem was that I was running off an older version of composer-rest-server.
I installed the developer tool back in Sep 17 and did the tutorial soon after. I tried the tutorial again and noticed that the deployment command was different and it would not let me deploy my network.
So I updated the composer-rest-server and component cli and it deployed fine. I then followed the steps on the authentication webpage that I referenced above and it worked as intended. I deployed my personal network with the new command and it worked as intended.
Lesson learned this stuff is still being updated and I should be more aware on what changes. Thank you very much #nilakantha singh deo
Open a new terminal from inside the project folder.Format your COMPOSER_PROVIDERS in notepad according to the document you mentioned and copy the whole message and paste it in the terminal.Then you can echo it (see it) by typing the following.
echo $COMPOSER_PROVIDERS
It should ideally return the same json file.
Then make sure that the compopser-rest-server is running with multiuser mode and authentication enabled in the same terminal where you echoed and saw the COMPOSER_PROVIDERS.
In browser now type
localhost:3000/auth/github
It should ask for authentication .Rest of the steps are listed in the document you mentioned.
Cheers!

Resources