I am trying to enable paypal virtual purchases on my web site that should trigger some update sql queries, Yet when I try to follow the Paypal instructions at the PayPal SDK page
I get a syntax error when I try to execute composer.phar on the JSON code they offer:
"require": {
"php": ">=5.3.0",
"ext-curl": "*",
"ext-json": "*",
"paypal/rest-api-sdk-php" : "0.5.*"
}
I get error:
php composer.phar update
[Seld\JsonLint\ParsingException]
"./composer.json" does not contain valid JSON
Parse error on line 1:
"require": { "php": ">=5.
---------^
Expected one of: 'EOF', '}', ',', ']'
What might it be? I just downloaded composer and I do not think it is an old version.
Or otherwise, is there some tutorial about how to set the paypal purchase procedure. The one I used at http://portapipe.wordpress.com/2012/10/26/paypal-pagamenti-tramite-php-con-risposta/ does not work.
I cannot find the source you used where they tell you how to create the composer.json file.
But I can tell you that if you gave the complete file contents in your question, it is in fact wrong. There is an additional set of curly braces needed to wrap all the content. Please see https://getcomposer.org/doc/00-intro.md#declaring-dependencies to get the idea.
Yes, sure. I believed paypal introduced a correct code and did not think about it too much. Of course JSON needs an embracing curled parenthesis couple, but I had no idea if for some reason composer added them itself. Of course adding them solves the problem.
Related
This is a new error the app worked previously and no changes were made. Won't compile using Expo.
Error: Problem validating fields in app.json. Learn more: https://docs.expo.dev/workflow/configuration/ • should NOT have additional property 'displayName'.
(Entire app.json file)
{
"name": "InstagramPrepTS",
"displayName": "InstagramPrepTS"
}
I went through a similar error. But was able to fix it, by just going into the app.json and changing the name from student-learner to studentLearner i.e i remove the "-" from the name. Because the slug name should not be the same as the name of the app i guess.
Changes to expo-cli may change what is/is-not a valid app.json configuration.
You'll need to remove the field it's complaining about, or possibly downgrade expo-cli, although I wouldn't recommend that.
I'm trying to make a community connector to connect my database in BigQuery to data studio with the service account that I hooked up as the Owner/DataViewer/JobUser of the BigQuery project. I know that the service account works when connecting to BigQuery because I've tested it elsewhere. I copied from the connector code from this tutorial (https://developers.google.com/datastudio/solution/blocks/using-service-accounts) almost exactly, replacing the SQL string with my query and adding some different query parameters. I also stored the service account's credentials in my script properties by pasting the json object and storing it like:
var service_account_creds_obj = {
"type": "service_account",
"project_id": ...
...
}
scriptProperties.setProperty('SERVICE_ACCOUNT_CREDS', JSON.stringify(service_account_creds_obj));
However, I always get stuck in the flow when my getData function calls getOauthService().getAccessToken(), which doesn't ever successfully return. When I create a report using the connector, I get this error: "Access not granted or expired." I can't find the documentation for getAccessToken and I'm having trouble understanding why it won't terminate. I can see that it doesn't return because a console.log immediately before that line displays but it never gets to the log on the next line. Then my try-catch block catches the error that I'm seeing. Note that my getOauthService function is exactly the same as the one from the documentation/tutorial example, except that I've played around with the input text in the call to createService. That input text shouldn't really matter though right?
Please, I've been trying to debug this for hours, but the documentation on this is pretty horrible, and it's really hard to debug since the flow of the code is handled in the background and stackdriver logging is really buggy.
I figured out my problem. The documentation posted above said to set the OAuth2 scope to https://www.googleapis.com/auth/bigquery.readonly. However, I naively included
"oauthScopes": ["https://www.googleapis.com/auth/bigquery.readonly"]
in my manifest file. Meanwhile, the code I copied over from the documentation already included this line:
.setScope(['https://www.googleapis.com/auth/bigquery.readonly']);
So I'm not sure exactly why this caused a problem. But it must have prevented the OAuth2.createService function from properly getting set.
I am working first time (new to Magento and PHP) with Magento and want to execute graphql using below url from ChromeiQL:
http://localhost:80/magento2/graphql
I am getting exception:
"SyntaxError: Unexpected token < in JSON at position 0"
Please note - I have not written any code. Just want execute by default code.
As per analysis, I found the reason "Server return as HTML instead of JSON
By-default folder structure (windows 10) is :
\wamp64\www\magento2\graphql:
- packages
- \codemirror-graphql
- \graphiql
- \graphql-language-server
- \graphql-language-service
- \graphql-language-service-interface
- \graphql-language-service-parser
- \graphql-language-service-server
- \graphql-language-service-types
- \graphql-language-service-utils
- proposals
- resources
- wg-agendas
My question:
Do I need to install any additional plugin to remove this issue. If yes. what is name of plugin and steps to install.
OR which file I need to change the code to remove this issue? Please help in details.
Thanks & Regards
Please read carefully this documentation and follow the steps
https://magento-research.github.io/pwa-studio/venia-pwa-concept/setup/
I hope You'll able to run both venia-concept theme for PWA and GraphQL too.
WAK 1.1.3 - during solution load, get a backend error:
[Backend] Error
[Backend] SyntaxError: JSON Parse error: Unexpected EOF
But it is not clear what file has this issue. How to most efficiently isolate this? I see nothing in the logs. The application has been running stably. I assume this is in a method, but am not finding it after a thorough search.
Thanks for guidance.
Kirk
Unexpected EOF error could be as small as forgetting to close function body with a right curly bracket.
I recommend first checking all the code on the backend you have modified since the last successful restart.
Secondly, since this occurs during solution load, the error is likely in bootstrap code including login listener. Or in model.js. You could try comment out all code in bootstrap.js or model.js see if the solution can load.
I'm working on a project that needs to use an extension that a customer must download and install, however my web page needs to communicate with the extension, so i use the documented way:
https://developer.chrome.com/extensions/runtime#method-sendMessage
chrome.runtime.sendMessage(string extensionId, any message, object options, function responseCallback)
{
...
}
This means i have to include the "extensionId" of an extension that only generates this code once its installed.
Doesn't this sound a little "cart before the horse"?
I have to explain this to our clients, how to go and get their extension ID, and some how apply it to this page in order for it to work? Its seems terribly clumsy, especially since i have have to set the permissions explicitly.
"externally_connectable": {
"matches": ["*://mywebsite.com/*"]
},
If I omit extensionId, it doesn't work.
"Uncaught Error: Invalid arguments to connect"
According to the link you posted, it says extensionId is optional and that it is "[t]he ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app." So it seems that it should still work even without the extension ID.
Having said that I noticed the same error on an extension I'm trying to debug, but it seems to be all working despite it. And when I add the extensionId the errors disappear. Might need to find a way to access the extensionId from within the extension.
Update: I successfully substituted in '##extension_id'. See this.