A failure occurred while executing com.github.triplet.gradle.play.tasks.CommitEdit$Committer - flutter

trying to publish bundle but i got this error every time
> Task :app:publishRelease
Task :commitEditForComDotDigcoderDotTecsiDotHse FAILED
Committing changes
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':commitEditForComDotDigcoderDotTecsiDotHse'.
A failure occurred while executing com.github.triplet.gradle.play.tasks.CommitEdit$Committer
400 Bad Request
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.digcoder.tecsi.hse/edits/14074052962661642881:commit
{
"code" : 400,
"errors" : [ {
"domain" : "global",
"message" : "Only releases with status draft may be created on draft app.",
"reason" : "badRequest"
} ],
"message" : "Only releases with status draft may be created on draft app.",
"status" : "INVALID_ARGUMENT"
}

Related

Can't create In-App Purchase Review Screenshot by API

I am trying to create an In-App Purchase Review Screenshot to create a new In-App Purchase by API.
I'm following Apple's guide, but am stuck at step : "Make an image reservation with POST /v1/inAppPurchaseAppStoreReviewScreenshots (Create an In-App Purchase Review Screenshot)."
Payload example :
{
"data": {
"type": "inAppPurchaseAppStoreReviewScreenshots",
"attributes": {
"fileName": "my-screenshot.jpg",
"fileSize": "45482"
},
"relationships": {
"inAppPurchaseV2": {
"data": {
"id": "1651010682",
"type": "inAppPurchases"
}
}
}
}
}
I always get error 409.
Exception = Client error: `POST https://api.appstoreconnect.apple.com/v1/inAppPurchaseAppStoreReviewScreenshots` resulted in a `409 Conflict` response:
{
"errors" : [ {
"id" : "7c813a34-37a6-49e7-be5f-699236659d0e",
"status" : "409",
"code" : "ENTITY_ERROR.A (truncated...)
I tried to remove V2 from inAppPurchaseV2 in relationships, but get the same error.
Has anyone succeeded by any chance?
I found the cause of the problem, it's because I was passing a string on "fileSize". By removing the quotes everything works!

Oauth2, getting Forbidden error (youtube analytics)

1.- I have created an app
2.- Through Oauth2 I got the token for an user
3.- I try to get the Youbute Analytics for the user's channel that authorized my app. But I have the error 403 (Forbidden). I do not have any clue ... can you help me?
Regards, P.
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "Forbidden",
"reason" : "forbidden"
} ],
"message" : "Forbidden"
}
at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:150)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1056)

Atlassian Swagger Request Validator - Spring MVC Issue

I am using atlassian swagger request validator in my springboot application. I tried to configure all the beans as explained in the [official documentation][1]
[1]: https://bitbucket.org/atlassian/swagger-request-validator/src/master/swagger-request-validator-springmvc/. But I am getting the below error
{
"status": 400,
"error": "Bad Request",
"message": "{\r\n \"messages\" : [ {\r\n \"key\" : \"validation.request.body.schema.unknownError\",\r\n \"level\" : \"ERROR\",\r\n \"message\" : \"An error occurred during schema validation - null.\",\r\n \"context\" : {\r\n \"requestPath\" : \"/mybook/mypage/12345/rules/\",\r\n \"apiRequestContentType\" : \"application/json\",\r\n \"location\" : \"REQUEST\",\r\n \"requestMethod\" : \"POST\"\r\n }\r\n } ]\r\n}",
"trace": "com.atlassian.oai.validator.springmvc.InvalidRequestException: {\r\n \"messages\" : [ {\r\n \"key\" : \"validation.request.body.schema.unknownError\",\r\n \"level\" : \"ERROR\",\r\n \"message\" : \"An error occurred during schema validation - null.\",\r\n \"context\" : {\r\n \"requestPath\" : \"/mybook/mypage/12345/rules/\",\r\n \"apiRequestContentType\" : \"application/json\",\r\n \"location\" : \"REQUEST\",\r\n \"requestMethod\" : \"POST\"\r\n }\r\n } ]\r\n}\r\n\tat com.atlassian.oai.validator.springmvc.DefaultValidationReportHandler.createValidationException(DefaultValidationReportHandler.java:96)\r\n\tat com.atlassian.oai.validator.springmvc.DefaultValidationReportHandler.processApiValidationReport(DefaultValidationReportHandler.java:63)\r\n\tat com.atlassian.oai.validator.springmvc.DefaultValidationReportHandler.handleRequestReport(DefaultValidationReportHandler.java:49)\r\n\tat com.atlassian.oai.validator.springmvc.OpenApiValidationInterceptor.preHandle(OpenApiValidationInterceptor.java:96)\r\n\tat org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:136)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1033)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)\r\n\tat org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:660)\r\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)\r\n\tat
Any pointers to resolve this issue will be helpful
I believe the issue is with the latest version. I used 2.7x and is working fine

Generic custom error response in Dingo API

I am trying to abstract all my error responses to match my API documentation for developing a good, pragmatic API using Lumen and the Dingo API package:
A JSON error body should provide a few things for the developer - a useful error message, a unique error code (that can be looked up for more details in the docs) and possibly a detailed description. JSON output representation for something like this would look like:
{
"code" : 1234,
"message" : "Something bad happened :(",
"description" : "More details about the error here"
}
At the moment, the Dingo API only provides me with the following response:
{
"message": "Could not create new user.",
"status_code": 422
}
1. How can I add extra fields to all error responses, e.g "description" and "code"
The configuration page shows a possible error format to set on your bootstrap/app.php file but I'm wondering how I can add possible new tags and use these.
I know it's possible using a custom exception and returning a new response:
app('Dingo\Api\Exception\Handler')->register(function (\App\Exceptions\ValidationException $exception) {
return Response::make(['code' => $exception->getCode(), 'message' => $exception->getMessage()], 401);
});
I want to know if this is the best practice to do it like this but on all exceptions (including the default ones of Dingo/Symfony), for example using the configuration parameters: ->setErrorFormat([]);
2. Change validation errors format
Validation errors for PUT, PATCH and POST requests will need a field breakdown. This is best modeled by using a fixed top-level error code for validation failures and providing the detailed errors in an additional errors field, like so:
{
"code" : 1024,
"message" : "Validation Failed",
"errors" : [
{
"code" : 5432,
"field" : "first_name",
"message" : "First name cannot have fancy characters"
},
{
"code" : 5622,
"field" : "password",
"message" : "Password cannot be blank"
}
]
}
Currently, Dingo API provides me the JSON in the following format:
{
"message": "Could not create new user.",
"status_code": 422,
"errors": {
"username": [
"The username field is required."
],
"password": [
"The password field is required."
]
}
}

CoffeeLint: Disable Warning message: Line exceeds maximum allowed length

I'm trying to disable the warning message from CoffeLint in visual studio code.
I've changed the coffeelint.json in my user folder to have the following:
"max_line_length": {
"name": "max_line_length",
"level": "ignore"
},
But this has had no effect, the error message is still shown. Anyone can suggest whats wrong?
Solution:
To configure coffeescript once installed there will be a default coffeelint.json in the C:\Users\ [username] \.vscode\extensions folder. This was entirly useless and changing configuration here has no effect (atleast in my case).
To solve this problem create a new coffeelint.json in the root of your project or add a coffeelintConfig section to your package.json. Either way, the configuration is exactly the same. If CoffeeLint doesn't find any configuration for the current project, it will check for a $HOME/coffeelint.json to use.
Following this an example configuration is below:
package.json
{
"name": "your-project",
"version": "0.0.0",
"coffeelintConfig": {
"indentation" : {
"level" : "error",
"value" : 4
},
"line_endings" : {
"value" : "unix",
"level" : "error"
}
}
}
coffeelint.json
{
"indentation" : {
"level" : "error",
"value" : 4
},
"line_endings" : {
"value" : "unix",
"level" : "error"
}
}
Now you can just edit this config to Lint your CoffeeScript :)