I have hard time to debug why the appcache doesn't work for me. On latest chrome I have got the following errors:
Creating Application Cache with manifest http://localhost/BEST/Home/Manifest
(index):1 Application Cache Checking event
(index):1 Application Cache Error event: Manifest fetch failed (4) http://localhost/BEST/Home/Manifest
More specific (from onerror method):
ApplicationCacheErrorEvent {
message: "Manifest fetch failed (4) http://localhost/BEST/Home/Manifest",
status: 4294967295,
url: "http://localhost/BEST/Home/Manifest",
reason: "manifest",
clipboardData: undefined…}
bubbles: false
cancelBubble: false
cancelable: false
clipboardData: undefined
currentTarget: ApplicationCache
defaultPrevented: false
eventPhase: 0
message: "Manifest fetch failed (4) http://localhost/BEST/Home/Manifest"
path: NodeList[0]
reason: "manifest"
returnValue: true
srcElement: ApplicationCache
oncached: null
onchecking: null
ondownloading: null
onerror: function (a,b,c)
onnoupdate: null
onobsolete: null
onprogress: null
onupdateready: null
status: 0
__proto__: ApplicationCache
status: 4294967295
target: ApplicationCache
oncached: null
onchecking: null
ondownloading: null
onerror: function (a,b,c)
onnoupdate: null
onobsolete: null
onprogress: null
onupdateready: nullstatus: 0
__proto__: ApplicationCache
timeStamp: 1425021666357
type: "error"
url: "http://localhost/BEST/Home/Manifest"
__proto__: ApplicationCacheErrorEvent
My manifest is very simple:
CACHE MANIFEST
CACHE:
Content/DataTables-1.10.3/language/polish.json
NETWORK:
*
Even the manifesto didn't help
Manifest file is served by ASP.NET MVC action, but doesn't matter I think.
Just in case the code:
public ActionResult Manifest()
{
//Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
var text = System.IO.File.ReadAllText(HttpContext.Server.MapPath("../a.appcache"));
return new ContentResult()
{
ContentType = "text/cache-manifest",
Content = text,
ContentEncoding = System.Text.Encoding.UTF8
};
}
[edit]
On Safari on Win I got
Application Cache manifest could not be fetched, because a redirection was attempted.
Maybe here is a problem?
This is what I got from fiddler attached to chrome:
I see, there is a 302, but could it be the problem?
And I doesn't know how to change it to 200.
[edit2]
I set manually the status code in the Manifest action and it started to work:
public ActionResult Manifest()
{
//Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
var text = System.IO.File.ReadAllText(HttpContext.Server.MapPath("../BEST.appcache"));
Response.StatusCode = 200;
return new ContentResult()
{
ContentType = "text/cache-manifest",
Content = text,
ContentEncoding = System.Text.Encoding.UTF8
};
}
But only temporary... After few tests, now I got different error. The reason this time is set to signature, not manifest:
Application Cache Error event: Failed to parse manifest http://localhost/BEST/Home/Manifest
(index):252
ApplicationCacheErrorEvent {
message: "Failed to parse manifest http://localhost/BEST/Home/Manifest",
status: 0,
url: "",
reason: "signature",
clipboardData: undefined…}
bubbles: false
cancelBubble: false
cancelable: false
clipboardData: undefined
currentTarget: ApplicationCache
defaultPrevented: false
eventPhase: 0
message: "Failed to parse manifest http://localhost/BEST/Home/Manifest"
path: NodeList[0]
reason: "signature"
returnValue: true
srcElement: ApplicationCache
status: 0
target: ApplicationCache
timeStamp: 1425025030583
type: "error"
url: ""
__proto__: ApplicationCacheErrorEvent
The solution was to set the status code to 200 and the no-store header couldn't be defined.
Related
I did a translation from .rvt to .dwg with Model Derivative API, but I didn't get the urn of the dwg file. When I did the request GET manifest for watching the progress, I got ...
{urn: 'dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGVtcGxhdGVzXzIvUEhBUk0ucnZ0', derivatives: Array(0), hasThumbnail: 'false', progress: '0% complete', type: 'manifest', …}
derivatives: []
hasThumbnail: "false"
progress: "0% complete"
region: "US"
status: "success"
type: "manifest"
urn: "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGVtcGxhdGVzXzIvUEhBUk0ucnZ0"
version: "1.0"
The progress is 0% complete and status is success, but, in this case, status should be inprogress.
Do you known the issue?
I am trying to call this api : http://localhost/api/columns {"tab":"client"}
but I couldn't get that one value from the json format
I get this error from the browser : {"code":404,"message":"No route found for \"GET \/api\/columns%20%7B%22tab%22:%22client%22%7D\""}
And tihs from CURL : {"code":400,"message":"Parameter \"tab\" of value \"NULL\" violated a constraint \"This value should not be null.\""}
This is my fos_rest.yml file :
fos_rest:
routing_loader: false
body_listener: true
exception:
enabled: true
param_fetcher_listener: force
view:
view_response_listener: 'force'
formats:
json: true
format_listener:
rules:
- { path: '^/api', prefer_extension: false , priorities: [json], fallback_format: json}
routes.yml
dashboard:
type: rest
resource: App\Controller\DashboardController
prefix : api
What I get from : php bin/console debug:router to check my routes :
get_columns GET ANY ANY /api/columns.{_format}
Typescript Version: 3.2.4
Angular version: ^7.2.15
Syncfusion Version: 17.1.50
Hi all. I am having an issue with Syncfusion's Pivot Grid. The code below is my onInit method which is taken straight from their demo. This was working as of 17.1.41 but now has magically stopped working. This issue is also on their StackBlitz example.
ngOnInit() {
let data: DataManager;
data = new DataManager({
url: this._controllerUrl + "/billing/extract",
adaptor: new WebApiAdaptor(),
crossDomain: true,
headers: [
{
"Content-Type": "application/json",
Accept: "application/json",
Authorization: "Bearer " + this.token
}
]
});
this.dataSource = {
enableSorting: true,
columns: [{ name: "Year" }, { name: "Month" }],
values: [{ name: "Cost", caption: "Cost (GBP)" }],
data: data,
rows: [{ name: "ServiceId" }],
formatSettings: [],
expandAll: false,
filters: []
};
this.button = new Button({ isPrimary: true });
this.button.appendTo("#export");
this.button.element.onclick = (): void => {
this.pivotGridObj.excelExport();
};
}
Here is the full error in Firefox:
ERROR Error: "Uncaught (in promise): TypeError: this.parent.dataSource.values is undefined
./node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/axis-field-renderer.js/AxisFields.prototype.createPivotButtons#http://localhost:4200/views-billing-billing-module.js:197167:17
./node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/axis-field-renderer.js/AxisFields.prototype.render#http://localhost:4200/views-billing-billing-module.js:197143:14
./node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/grouping-bar.js/GroupingBar.prototype.appendToElement#http://localhost:4200/views-billing-billing-module.js:197347:49
./node_modules/#syncfusion/ej2-base/src/observer.js/Observer.prototype.notify#http://localhost:4200/views-billing-billing-module.js:10781:25
./node_modules/#syncfusion/ej2-base/src/component.js/Component.prototype.notify#http://localhost:4200/views-billing-billing-module.js:5505:32
./node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js/PivotView.prototype.renderPivotGrid#http://localhost:4200/views-billing-billing-module.js:204990:18
./node_modules/#syncfusion/ej2-base/src/observer.js/Observer.prototype.notify#http://localhost:4200/views-billing-billing-module.js:10781:25
./node_modules/#syncfusion/ej2-base/src/component.js/Component.prototype.notify#http://localhost:4200/views-billing-billing-module.js:5505:32
./node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js/PivotView.prototype.initEngine#http://localhost:4200/views-billing-billing-module.js:206000:14
./node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js/PivotView.prototype.executeQuery#http://localhost:4200/views-billing-billing-module.js:206047:14
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke#http://localhost:4200/polyfills.js:7688:26
onInvoke#http://localhost:4200/vendor.js:82616:33
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke#http://localhost:4200/polyfills.js:7687:52
./node_modules/zone.js/dist/zone.js/</Zone.prototype.run#http://localhost:4200/polyfills.js:7447:43
scheduleResolveOrReject/<#http://localhost:4200/polyfills.js:8186:34
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invokeTask#http://localhost:4200/polyfills.js:7720:31
onInvokeTask#http://localhost:4200/vendor.js:82607:33
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invokeTask#http://localhost:4200/polyfills.js:7719:60
./node_modules/zone.js/dist/zone.js/</Zone.prototype.runTask#http://localhost:4200/polyfills.js:7492:47
drainMicroTaskQueue#http://localhost:4200/polyfills.js:7898:35
./node_modules/zone.js/dist/zone.js/</ZoneTask.invokeTask#http://localhost:4200/polyfills.js:7799:21
invokeTask#http://localhost:4200/polyfills.js:9041:14
globalZoneAwareCallback#http://localhost:4200/polyfills.js:9067:17
Here is the full error in Chrome/Edge
core.js:15724 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at AxisFields.push../node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/axis-field-renderer.js.AxisFields.createPivotButtons (axis-field-renderer.js:45)
at AxisFields.push../node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/axis-field-renderer.js.AxisFields.render (axis-field-renderer.js:21)
at GroupingBar.push../node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/grouping-bar.js.GroupingBar.appendToElement (grouping-bar.js:142)
at Observer.push../node_modules/#syncfusion/ej2-base/src/observer.js.Observer.notify (observer.js:89)
at PivotViewComponent.push../node_modules/#syncfusion/ej2-base/src/component.js.Component.notify (component.js:188)
at PivotViewComponent.push../node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js.PivotView.renderPivotGrid (pivotview.js:881)
at Observer.push../node_modules/#syncfusion/ej2-base/src/observer.js.Observer.notify (observer.js:89)
at PivotViewComponent.push../node_modules/#syncfusion/ej2-base/src/component.js.Component.notify (component.js:188)
at PivotViewComponent.push../node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js.PivotView.initEngine (pivotview.js:1891)
at PivotViewComponent.push../node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js.PivotView.executeQuery (pivotview.js:1938)
at resolvePromise (zone.js:831)
at zone.js:896
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
at Object.onInvokeTask (core.js:17290)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
at drainMicroTaskQueue (zone.js:601)
at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:502)
at invokeTask (zone.js:1744)
at XMLHttpRequest.globalZoneAwareCallback (zone.js:1770)
The weird thing about this, is that if I use a subset of the data that is coming back from the server and set it locally, it all works.
Here is an image of the request that I am making with the response and the data. I'm not sure if this is something that I can fix as this may be a bug with the DataManager.
I have tried reverting back to the previous version that I used, but there still seems to be the same problem.
We are glad to announce that our Essential Studio 2019 Volume 2 Beta Release version 17.2.0.28 is rolled out with the mentioned issue fix and is available for download under the following link.
https://www.syncfusion.com/forums/145548/essential-studio-2019-volume-2-beta-release-v17-2-0-28-is-available-for-download
Note: This issue fix will be included in our main release as well which is expected to be available by mid of July 2019.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Dinesh Babu Yadav
When attempting to export from Cloud SQL using a RESTful call to the Google API we've been encountering random failures, approximately 1 in 10 attempts. The log extract below has been taken from Stackdriver and doesn't offer much insight into the root cause:
{
insertId: "55C4B416A7642.A1B5D8E.570939C6"
logName: "projects/my-dev-project/logs/cloudaudit.googleapis.com%2Fdata_access"
protoPayload: {
#type: "type.googleapis.com/google.cloud.audit.AuditLog"
authenticationInfo: {
principalEmail: "jsmith#mycompany.com"
}
authorizationInfo: [
0: {
authorizationLoggingOptions: {
permissionType: "DATA_READ"
}
granted: true
permission: "cloudsql.instances.export"
resource: "instances/my-db-instance"
}
]
methodName: "cloudsql.instances.export"
request: {
#type: "type.googleapis.com/cloudsql.admin.InstancesExportRequest"
exportContext: {
database: [
0: "business_db"
]
fileType: "CSV"
schemaOnly: true
selectQuery:
"SELECT
replace(IFNULL(`ID`,'<NULL_VALUE>'), '', '') AS `ID`,
replace(IFNULL(`NAME`,'<NULL_VALUE>'), '', '') AS `NAME`,
replace(IFNULL(`ADDRESS`,'<NULL_VALUE>'), '', '') AS `ADDRESS`,
replace(IFNULL(`DOB`,'<NULL_VALUE>'), '', '') AS `DOB`
FROM CUSTOMERS"
table: [
0: "CUSTOMERS"
]
uri: "gs://my-dev-project-stage/CUSTOMERS_full.csv"
}
instanceName: {
fullProjectId: "my-dev-project"
instanceId: "my-db-instance"
}
}
requestMetadata: {
callerIp: "107.178.192.158"
}
resourceName: "instances/my-db-instance"
serviceName: "cloudsql.googleapis.com"
status: {
code: 2
message: "UNKNOWN"
}
}
receiveTimestamp: "2017-10-24T13:52:53.738754270Z"
resource: {
labels: {
database_id: "my-dev-project:my-db-instance"
project_id: "my-dev-project"
region: "europe"
}
type: "cloudsql_database"
}
severity: "ERROR"
timestamp: "2017-10-24T13:52:53.317Z"
}
The only difference between this log entry and a successful export are the three property values mentioned in the post title. In a successful entry they are as follows:
status: {
}
}
receiveTimestamp: "2017-10-24T14:21:44.997050352Z"
resource: {
labels: {
database_id: "my-dev-project:my-db-instance"
project_id: "my-dev-project"
region: "europe"
}
type: "cloudsql_database"
}
severity: "INFO"
timestamp: "2017-10-24T14:21:43.757Z"
}
The intermittent nature suggests the root cause is an external factor. I.e. the exact same request with the same parameters; connection details, output file location and SQL statement will work a few minutes later. There's no consistency to which exports are failing.
We've already discovered that Cloud SQL does not support multiple simultaneous exports and we've implemented a queuing system to avoid this issue.
The data volumes don't seem to be an influencing factor either. An export will work for a 100,000 row file and then fail for 500 row file. In fact smaller or even empty data sets seem to be more susceptible to failure.
If anyone has any idea's or suggestions as to a solution or avenue of investigation I'd be interested to hear them. Thanks.
Help me with multiple response body with single status code in yaml format.
Ex::
'401':
description: Not Found
headers:
Content-Type :
type: string
default: application/json;charset=UTF-8
examples:
errorCode: '48'
errorLabel: RONotAllowed
errorDescription: Unable to execute the remote operation as it is not allowed for the vehicle
'401':
description: Not Found
headers:
Content-Type :
type: string
default: application/json;charset=UTF-8
examples:
errorCode: '45'
errorLabel: VehicleNotFound
errorDescription: Vehicle could not be found using VIN provided in request
'401':
description: Not Found
headers:
Content-Type :
type: string
default: application/json;charset=UTF-8
examples:
errorCode: '49'
errorLabel: VehicleAlreadyOnline
errorDescription: Unable to execute the remote operation since vehicle is already online
Using above code i found error
✖ YAML Syntax Error
Duplicated mapping key at line 608, column 9: '401'
If I understand this correctly you are trying to provide a list of examples for the error code. For this you need:
'401':
description: Not Found
headers:
Content-Type :
type: string
default: application/json;charset=UTF-8
examples:
- errorCode: '48'
errorLabel: RONotAllowed
errorDescription: 'Unable to execute the remote operation as it is not allowed for the vehicle'
- errorCode: '45'
errorLabel: VehicleNotFound
errorDescription: 'Vehicle could not be found using VIN provided in request'
- errorCode: '49'
errorLabel: VehicleAlreadyOnline
errorDescription: 'Unable to execute the remote operation since vehicle is already online'