autodesk forge viewer.js update from 6.5.1 to 6.6 or 7.1, 2d hyperlink promise exception - autodesk-forge

change view from 3d to 2d view.
In 6.5.1
viewer.load(document.getViewablePath(Views2D));
no exception
In 6.6
viewer.load(document.getViewablePath(Views2D));
//promise exception in chrome console
In 7.1
viewer.loadModel(document.getViewablePath(Views2D), {});
//promise exception in chrome console
Uncaught (in promise)
{instanceTree: null, maxTreeDepth: 0, err: undefined}
Promise.then (async)
loadHyperlinks # HyperlinkTool.js:323
activate # HyperlinkTool.js:123
activateTool # ToolController.js:265
f.load # Hyperlink.js:42
loadExtensionLocal # ExtensionManager.js:270
loadExtension # ExtensionManager.js:213
(anonymous) # ExtensionManager.js:312
o.onload # globals.js:183
load (async)
u # globals.js:185
(anonymous) # ExtensionManager.js:310
loadExtensionAsync # ExtensionManager.js:309
loadExtension # ExtensionManager.js:205
(anonymous) # GuiViewer3D.js:412
setTimeout (async)
D.createUI # GuiViewer3D.js:406
(anonymous) # GuiViewer3D.js:300
(anonymous) # GuiViewer3D.js:288
setTimeout (async)
(anonymous) # GuiViewer3D.js:316
(anonymous) # Viewer3D.js:1228
(anonymous) # F2DLoader.js:420

Engineering is still taking time to address this issue.
While we wait for their fix we can work around this issue by disabling the hyperlink extension in our load options:
new Autodesk.Viewing.Private.GuiViewer3D(...),{disabledExtensions:{hyperlink:true}}

Related

How to play a local video in Vue-plyr?

I can get vue-plyr to work with a youtube video like so:
<template>
<section id="vision" class="vision">
<vue-plyr>
<div data-plyr-provider="youtube" data-plyr-embed-id="bTqVqk7FSmY"></div>
</vue-plyr>
</section>
</template>
but when I try to use a local video like described in the doc:
<template>
<section id="vision" class="vision">
<vue-plyr :options="options">
<video
controls
crossorigin
playsinline
>
<source
size="1080"
src="../../videos/cgi_neutral.mp4"
type="video/mp4"
/>
</video>
</vue-plyr>
</section>
</template>
I get an error:
Uncaught Error: Module parse failed: Unexpected character ' ' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
at Object../resources/videos/cgi_neutral.mp4 (app.js:92053)
at __webpack_require__ (app.js:92132)
at Module../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/vue/sections/vision.vue?vue&type=template&id=0c8fcfd8&scoped=true (app.js:39037)
at __webpack_require__ (app.js:92132)
at Module../resources/vue/sections/vision.vue?vue&type=template&id=0c8fcfd8&scoped=true (app.js:87992)
at __webpack_require__ (app.js:92132)
at Module../resources/vue/sections/vision.vue (app.js:87291)
at __webpack_require__ (app.js:92132)
at Module../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/vue/index.vue?vue&type=script&setup=true&lang=js (app.js:36141)
at __webpack_require__ (app.js:92132)
./resources/videos/cgi_neutral.mp4 # app.js:92053
__webpack_require__ # app.js:92132
./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/vue/sections/vision.vue?vue&type=template&id=0c8fcfd8&scoped=true # app.js:39037
__webpack_require__ # app.js:92132
./resources/vue/sections/vision.vue?vue&type=template&id=0c8fcfd8&scoped=true # app.js:87992
__webpack_require__ # app.js:92132
./resources/vue/sections/vision.vue # app.js:87291
__webpack_require__ # app.js:92132
./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/vue/index.vue?vue&type=script&setup=true&lang=js # app.js:36141
__webpack_require__ # app.js:92132
./resources/vue/index.vue?vue&type=script&setup=true&lang=js # app.js:87384
__webpack_require__ # app.js:92132
./resources/vue/index.vue # app.js:86765
__webpack_require__ # app.js:92132
./resources/js/router.js # app.js:39210
__webpack_require__ # app.js:92132
./resources/js/app.js # app.js:39103
__webpack_require__ # app.js:92132
(anonymous) # app.js:92297
__webpack_require__.O # app.js:92169
(anonymous) # app.js:92299
(anonymous) # app.js:92301
This git issue says to install scss-loader but I already have it:
"sass-loader": "^12.2.0"
What am I doing wrong?
Can you put file mp4 in public folder ? And it can be acccessed via browser with url like
localhost:8000/videos/cgi_neutral.mp4 ,
then embed in component :
<source
size="1080"
src="/videos/cgi_neutral.mp4"
type="video/mp4"
/>
It is better than use loader with webpack + file-loader

Uncaught TypeError: $jscomp.inherits is not a function

I'm getting this error while trying to build a Clojurescript project with shadow-cljs. The error is happening with the optimization level set to simple.
The full output in the browser console looks like this:
js.js:74 shadow-cljs - failed to load 34
shadow.js.jsRequire # js.js:74
shadow$provide.<computed> # index.js:5
shadow.js.jsRequire # js.js:66
shadow$provide.<computed> # index.js:8
shadow.js.jsRequire # js.js:66
shadow$provide.<computed> # index.js:6
shadow.js.jsRequire # js.js:66
shadow.js.require # js.js:113
(anonymous) # index.js:2
(anonymous) # append.js:2
js.js:74 shadow-cljs - failed to load 49
shadow.js.jsRequire # js.js:74
shadow$provide.<computed> # index.js:8
shadow.js.jsRequire # js.js:66
shadow$provide.<computed> # index.js:6
shadow.js.jsRequire # js.js:66
shadow.js.require # js.js:113
(anonymous) # index.js:2
(anonymous) # append.js:2
js.js:74 shadow-cljs - failed to load 124
shadow.js.jsRequire # js.js:74
shadow$provide.<computed> # index.js:6
shadow.js.jsRequire # js.js:66
shadow.js.require # js.js:113
(anonymous) # index.js:2
(anonymous) # append.js:2
js.js:74 shadow-cljs - failed to load 148
shadow.js.jsRequire # js.js:74
shadow.js.require # js.js:113
(anonymous) # index.js:2
(anonymous) # append.js:2
index.js:5 Uncaught TypeError: $jscomp.inherits is not a function
at Object.shadow$provide.<computed> (index.js:5)
at shadow.js.jsRequire (js.js:66)
at Object.shadow$provide.<computed> (index.js:5)
at shadow.js.jsRequire (js.js:66)
at Object.shadow$provide.<computed> (index.js:8)
at shadow.js.jsRequire (js.js:66)
at Object.shadow$provide.<computed> (index.js:6)
at Object.shadow.js.jsRequire (js.js:66)
at Object.shadow.js.require (js.js:113)
at index.js:2
shadow$provide.<computed> # index.js:5
shadow.js.jsRequire # js.js:66
shadow$provide.<computed> # index.js:5
shadow.js.jsRequire # js.js:66
shadow$provide.<computed> # index.js:8
shadow.js.jsRequire # js.js:66
shadow$provide.<computed> # index.js:6
shadow.js.jsRequire # js.js:66
shadow.js.require # js.js:113
(anonymous) # index.js:2
(anonymous) # append.js:2
favicon.ico:1 GET http://localhost:8000/favicon.ico 404 (File not found)
I've created an example repo that replicates what I'm seeing as simply as I can here.
I've tried clearing caches and whatnot as described here.
With optimizations set to advanced I don't get this problem but I get other bugs more randomly with harder to read stack traces. Since it seems likely that it's the same problem appearing in different ways and since this is easier to replicate I'm attempting to making things work in simple mode first. The errors I get in the full app with advanced compilation look like this:
core.cljs:2564 Uncaught TypeError: pe is not a function
at Ib (core.cljs:2564)
at Function.wn.b (set.cljs:56)
at Nn.g._update_watching (ratom.cljs:408)
at yn (ratom.cljs:62)
at Qn (ratom.cljs:539)
at c.render (component.cljs:271)
at kg (react-dom.production.min.js:188)
at qi (react-dom.production.min.js:187)
at ak (react-dom.production.min.js:270)
at Ni (react-dom.production.min.js:251)
Ib # core.cljs:2564
wn.b # set.cljs:56
g._update_watching # ratom.cljs:408
yn # ratom.cljs:62
Qn # ratom.cljs:539
(anonymous) # component.cljs:271
kg # react-dom.production.min.js:188
qi # react-dom.production.min.js:187
ak # react-dom.production.min.js:270
Ni # react-dom.production.min.js:251
me # react-dom.production.min.js:251
Ag # react-dom.production.min.js:244
(anonymous) # react-dom.production.min.js:124
e.unstable_runWithPriority # scheduler.production.min.js:19
cd # react-dom.production.min.js:123
Oh # react-dom.production.min.js:124
uc # react-dom.production.min.js:123
Vc # react-dom.production.min.js:238
enqueueForceUpdate # react-dom.production.min.js:135
r.forceUpdate # react.production.min.js:13
g.flush_render # batching.cljs:39
g.flush_queues # batching.cljs:98
g.run_queues # batching.cljs:78
a # batching.cljs:59
requestAnimationFrame (async)
g.schedule # batching.cljs:59
mn # batching.cljs:52
g.queue_render # batching.cljs:64
pn # batching.cljs:112
Qn.d.ob.d.Ja # ratom.cljs:544
g._handle_change # ratom.cljs:402
Hc # ratom.cljs:345
Cn # ratom.cljs:104
g.ua # ratom.cljs:146
Qc # core.cljs:864
qf # core.cljs:4493
(anonymous) # lobby.cljs:53
fa # react-dom.production.min.js:53
ma # react-dom.production.min.js:53
wa # react-dom.production.min.js:54
nh # react-dom.production.min.js:101
ih # react-dom.production.min.js:102
(anonymous) # react-dom.production.min.js:114
$g # react-dom.production.min.js:293
eb # react-dom.production.min.js:51
eh # react-dom.production.min.js:106
yb # react-dom.production.min.js:76
ub # react-dom.production.min.js:75
e.unstable_runWithPriority # scheduler.production.min.js:19
cd # react-dom.production.min.js:123
rb # react-dom.production.min.js:293
Fb # react-dom.production.min.js:74
Interestingly these particular errors go away when I turn on pseudo-names.
Does anyone have any idea what's going on here?
The easiest way to fix this is setting :compiler-options {:output-feature-set :es6}. $jscomp.inherits are the polyfills inserted by the Closure Compiler for transpiling class and other more "modern" constructs. Setting :es6 will stop that from happening. This is the best option unless you need to care about ancient browser versions.
Thanks for setting up a reproducible example. I can reproduce it with :simple, setting it to :advanced however works just fine? I have a rough idea what is happening in :simple and will see how to fix it properly.

[Browser][cordova.js][xhrStatusChangeHandler] Could not XHR config.xml: Not Found

I am trying to develop an app using ionic 4, angular 6, Nodejs 10 and need to integrate google maps. When I run my app, I always see this error in the dev tools browser console - [Browser][cordova.js][xhrStatusChangeHandler] Could not XHR config.xml: Not Found. Copied the full console at the end.
Following is the code I have -
app.module.ts
import { NgModule } from '#angular/core';
import { BrowserModule } from '#angular/platform-browser';
import { RouteReuseStrategy } from '#angular/router';
import { IonicModule, IonicRouteStrategy } from '#ionic/angular';
import { SplashScreen } from '#ionic-native/splash-screen/ngx';
import { StatusBar } from '#ionic-native/status-bar/ngx';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { GoogleMaps } from '#ionic-native/google-maps';
#NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [
BrowserModule,
IonicModule.forRoot(),
AppRoutingModule
],
providers: [
StatusBar,
GoogleMaps,
SplashScreen,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
],
bootstrap: [AppComponent]
})
export class AppModule {}
Following is my app.component.ts file -
import { Component, ViewChild } from '#angular/core';
import { Platform, Nav } from '#ionic/angular';
import { SplashScreen } from '#ionic-native/splash-screen/ngx';
import { StatusBar } from '#ionic-native/status-bar/ngx';
import { HomePage } from './home/home.page';
#Component({
selector: 'app-root',
templateUrl: 'app.component.html'
})
export class AppComponent {
#ViewChild(Nav) nav: Nav;
rootPage: any;
public appPages = [
{
title: 'Home',
url: '/home',
icon: 'home'
},
{
title: 'List',
url: '/list',
icon: 'list'
}
];
constructor(
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar
) {
this.initializeApp();
}
initializeApp() {
this.platform.ready().then(() => {
this.rootPage = HomePage;
this.statusBar.styleDefault();
this.splashScreen.hide();
});
}
}
home.page.ts
import { Component, OnInit } from '#angular/core';
import { GoogleMaps, GoogleMap } from '#ionic-native/google-maps/ngx';
import { Platform } from '#ionic/angular';
import { Environment } from '#ionic-native/google-maps';
#Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage implements OnInit {
map: GoogleMap;
constructor( private platform: Platform) {}
async ngOnInit() {
await this.platform.ready();
await this.loadMap();
}
loadMap() {
Environment.setEnv({
'API_KEY_FOR_BROWSER_RELEASE': 'Agktkllffff1xGYLjDF0v1i2RSDrqDLjEmDdLI',
'API_KEY_FOR_BROWSER_DEBUG': ''
});
this.map = GoogleMaps.create('map_canvas');
}
}
home.page.html
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-menu-button></ion-menu-button>
</ion-buttons>
<ion-title>
Home
</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<h3>GoogleMaps</h3>
<div id = "map_canvas">
<button ion-button (click)="onButtonClick($event)">Demo</button>
</div>
</ion-content>
I checked my Google Map API key and it doesn't has problem and double checked that I am using the correct one. My account is also fine and shouldn't be a problem with that. I am wondering what is causing this issue. The command that I am using to run my application is -
ionic cordova run browser -l
The url that opens up is http://172.29.54.8:8100/home
console.log error details -
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
cordova.js:1066 deviceready has not fired after 5 seconds.
cordova.js:1059 Channel not fired: onPluginsReady
cordova.js:1059 Channel not fired: onCordovaReady
bootstrap.js:15 Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.
(anonymous) # bootstrap.js:15
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:421
push../node_modules/zone.js/dist/zone.js.Zone.runTask # zone.js:188
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask # zone.js:496
ZoneTask.invoke # zone.js:485
timer # zone.js:2054
setTimeout (async)
scheduleTask # zone.js:2075
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:407
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask # zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask # zone.js:255
scheduleMacroTaskWithCurrentZone # zone.js:1114
(anonymous) # zone.js:2090
proto.(anonymous function) # zone.js:1394
checkReady # bootstrap.js:13
./node_modules/#ionic-native/core/index.js # index.js:11
__webpack_require__ # bootstrap:83
./node_modules/#ionic-native/splash-screen/ngx/index.js # index.js:1
__webpack_require__ # bootstrap:83
./src/app/app.module.ts # app.component.ts:12
__webpack_require__ # bootstrap:83
./src/main.ts # main.ts:1
__webpack_require__ # bootstrap:83
0 # main.ts:12
__webpack_require__ # bootstrap:83
checkDeferredModules # bootstrap:45
webpackJsonpCallback # bootstrap:32
(anonymous) # main.js:1
cordova.js:1024 adding proxy for common
cordova.js:1024 adding proxy for PluginEnvironment
cordova.js:1024 adding proxy for CordovaGoogleMaps
cordova.js:1024 adding proxy for PluginLocationService
cordova.js:1024 adding proxy for PluginGeocoder
cordova.js:1024 adding proxy for StatusBar
cordova.js:1024 adding proxy for Device
cordova.js:1024 adding proxy for SplashScreen
StatusBarProxy.js:23 StatusBar is not supported
zone.js:2969 GET http://172.29.54.8:8100/config.xml 404 (Not Found)
scheduleTask # zone.js:2969
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:407
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask # zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask # zone.js:255
scheduleMacroTaskWithCurrentZone # zone.js:1114
(anonymous) # zone.js:3001
proto.(anonymous function) # zone.js:1394
readConfig # cordova.js:891
initAndShow # SplashScreenProxy.js:154
(anonymous) # SplashScreenProxy.js:165
build # cordova.js:51
require # cordova.js:66
localRequire # cordova.js:47
exports.mapModules # cordova.js:1352
(anonymous) # cordova.js:1152
f # cordova.js:645
Channel.fire # cordova.js:798
(anonymous) # cordova.js:1144
onScriptLoadingComplete # cordova.js:1574
scriptLoadedCallback # cordova.js:1591
(anonymous) # cordova.js:1545
wrapFn # zone.js:1188
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:421
push../node_modules/zone.js/dist/zone.js.Zone.runTask # zone.js:188
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask # zone.js:496
invokeTask # zone.js:1540
globalZoneAwareCallback # zone.js:1566
error (async)
customScheduleGlobal # zone.js:1666
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:407
onScheduleTask # zone.js:297
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:401
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask # zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleEventTask # zone.js:258
(anonymous) # zone.js:1831
desc.set # zone.js:1244
requireEnsure # bootstrap:145
webpackAsyncContext # .*\.entry\.js$ include: \.entry\.js$ namespace object:780
o # ionic.core.js:6
t.In # ionic.core.js:9
$ # ionic.core.js:6
(anonymous) # ionic.core.js:6
r # ionic.core.js:6
(anonymous) # ionic.core.js:6
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke # zone.js:388
onInvoke # core.js:14060
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke # zone.js:387
push../node_modules/zone.js/dist/zone.js.Zone.run # zone.js:138
(anonymous) # zone.js:872
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:421
onInvokeTask # core.js:14051
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:420
push../node_modules/zone.js/dist/zone.js.Zone.runTask # zone.js:188
drainMicroTaskQueue # zone.js:595
Promise.then (async)
scheduleMicroTask # zone.js:578
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:410
onScheduleTask # zone.js:297
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:401
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask # zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMicroTask # zone.js:252
scheduleResolveOrReject # zone.js:862
resolvePromise # zone.js:808
(anonymous) # zone.js:724
webpackJsonpCallback # bootstrap:25
(anonymous) # 12.js:1
cordova.js:866 [Browser][cordova.js][xhrStatusChangeHandler] Could not XHR config.xml: Not Found
fail # cordova.js:866
xhrStatusChangeHandler # cordova.js:880
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:421
push../node_modules/zone.js/dist/zone.js.Zone.runTask # zone.js:188
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask # zone.js:496
invokeTask # zone.js:1540
globalZoneAwareCallback # zone.js:1566
load (async)
customScheduleGlobal # zone.js:1666
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:407
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask # zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleEventTask # zone.js:258
(anonymous) # zone.js:1831
readConfig # cordova.js:886
initAndShow # SplashScreenProxy.js:154
(anonymous) # SplashScreenProxy.js:165
build # cordova.js:51
require # cordova.js:66
localRequire # cordova.js:47
exports.mapModules # cordova.js:1352
(anonymous) # cordova.js:1152
f # cordova.js:645
Channel.fire # cordova.js:798
(anonymous) # cordova.js:1144
onScriptLoadingComplete # cordova.js:1574
scriptLoadedCallback # cordova.js:1591
(anonymous) # cordova.js:1545
wrapFn # zone.js:1188
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:421
push../node_modules/zone.js/dist/zone.js.Zone.runTask # zone.js:188
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask # zone.js:496
invokeTask # zone.js:1540
globalZoneAwareCallback # zone.js:1566
error (async)
customScheduleGlobal # zone.js:1666
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:407
onScheduleTask # zone.js:297
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:401
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask # zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleEventTask # zone.js:258
(anonymous) # zone.js:1831
desc.set # zone.js:1244
requireEnsure # bootstrap:145
webpackAsyncContext # .*\.entry\.js$ include: \.entry\.js$ namespace object:780
o # ionic.core.js:6
t.In # ionic.core.js:9
$ # ionic.core.js:6
(anonymous) # ionic.core.js:6
r # ionic.core.js:6
(anonymous) # ionic.core.js:6
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke # zone.js:388
onInvoke # core.js:14060
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke # zone.js:387
push../node_modules/zone.js/dist/zone.js.Zone.run # zone.js:138
(anonymous) # zone.js:872
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:421
onInvokeTask # core.js:14051
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:420
push../node_modules/zone.js/dist/zone.js.Zone.runTask # zone.js:188
drainMicroTaskQueue # zone.js:595
Promise.then (async)
scheduleMicroTask # zone.js:578
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:410
onScheduleTask # zone.js:297
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:401
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask # zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMicroTask # zone.js:252
scheduleResolveOrReject # zone.js:862
resolvePromise # zone.js:808
(anonymous) # zone.js:724
webpackJsonpCallback # bootstrap:25
(anonymous) # 12.js:1
SplashScreenProxy.js:163 [Browser][cordova.js][xhrStatusChangeHandler] Could not XHR config.xml: Not Found
(anonymous) # SplashScreenProxy.js:163
fail # cordova.js:869
xhrStatusChangeHandler # cordova.js:880
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:421
push../node_modules/zone.js/dist/zone.js.Zone.runTask # zone.js:188
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask # zone.js:496
invokeTask # zone.js:1540
globalZoneAwareCallback # zone.js:1566
load (async)
customScheduleGlobal # zone.js:1666
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:407
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask # zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleEventTask # zone.js:258
(anonymous) # zone.js:1831
readConfig # cordova.js:886
initAndShow # SplashScreenProxy.js:154
(anonymous) # SplashScreenProxy.js:165
build # cordova.js:51
require # cordova.js:66
localRequire # cordova.js:47
exports.mapModules # cordova.js:1352
(anonymous) # cordova.js:1152
f # cordova.js:645
Channel.fire # cordova.js:798
(anonymous) # cordova.js:1144
onScriptLoadingComplete # cordova.js:1574
scriptLoadedCallback # cordova.js:1591
(anonymous) # cordova.js:1545
wrapFn # zone.js:1188
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:421
push../node_modules/zone.js/dist/zone.js.Zone.runTask # zone.js:188
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask # zone.js:496
invokeTask # zone.js:1540
globalZoneAwareCallback # zone.js:1566
error (async)
customScheduleGlobal # zone.js:1666
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:407
onScheduleTask # zone.js:297
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:401
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask # zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleEventTask # zone.js:258
(anonymous) # zone.js:1831
desc.set # zone.js:1244
requireEnsure # bootstrap:145
webpackAsyncContext # .*\.entry\.js$ include: \.entry\.js$ namespace object:780
o # ionic.core.js:6
t.In # ionic.core.js:9
$ # ionic.core.js:6
(anonymous) # ionic.core.js:6
r # ionic.core.js:6
(anonymous) # ionic.core.js:6
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke # zone.js:388
onInvoke # core.js:14060
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke # zone.js:387
push../node_modules/zone.js/dist/zone.js.Zone.run # zone.js:138
(anonymous) # zone.js:872
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:421
onInvokeTask # core.js:14051
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:420
push../node_modules/zone.js/dist/zone.js.Zone.runTask # zone.js:188
drainMicroTaskQueue # zone.js:595
Promise.then (async)
scheduleMicroTask # zone.js:578
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:410
onScheduleTask # zone.js:297
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:401
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask # zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMicroTask # zone.js:252
scheduleResolveOrReject # zone.js:862
resolvePromise # zone.js:808
(anonymous) # zone.js:724
webpackJsonpCallback # bootstrap:25
(anonymous) # 12.js:1
bootstrap.js:10 Ionic Native: deviceready event fired after 15597 ms
StatusBarProxy.js:23 StatusBar is not supported
cordova.js:1024 adding proxy for map_0_605401752643
util.js:225 Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
try {
xhr.open("get", "/config.xml", true);
xhr.send();
} catch(e) {
fail('[Browser][cordova.js][readConfig] Could not XHR config.xml: ' + JSON.stringify(e));
}
Try to find these lines in cordova.js file of the platform.
I guess your application is in a sub-folder. Hence the error. Change it to
try {
xhr.open("get", "/<foldername>/config.xml", true);
xhr.send();
} catch(e) {
fail('[Browser][cordova.js][readConfig] Could not XHR config.xml: ' + JSON.stringify(e));
}
I meet the problem when I run command
ionic cordova build browser
and gulp wrong build content to the serve,
wwwunber platforms/browser is the correct one
the wwwunder project folder is wrong one
In my case I am launching my app like the following
http://1.2.3.4/MyApp.BETA/
I think a better approach is to assume current directory instead of root. Therefor the fix should be:
xhr.open("get", "./config.xml", true);
Where is the source of this cordova.js?
Who should be notified to fix this? Cordova?
Thank you.

Getting 404 for CORS request to Web API only in Chrome and only on server

I'm trying to POST data from a website to a Web API endpoint on the same server with the same domain name, but a different port number. It works with IE11 both locally and on our test server, but Chrome only works locally. On the test server I get a 404 error. As far as I can tell, it qualifies as a "simple" request, however the 404 error shows the HTTP Method was "OPTIONS", so it must be making a preflight request and failing on that.
zone.js:2933 OPTIONS http://example.com:8001/api/search/quickSearch?v=1.35.2664 404 (Not Found)
scheduleTask # zone.js:2933
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:411
onScheduleTask # zone.js:301
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:405
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleTask # zone.js:236
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleMacroTask # zone.js:259
(anonymous) # zone.js:2966
proto.(anonymous function) # zone.js:1366
(anonymous) # angular.js:12587
sendReq # angular.js:12332
serverRequest # angular.js:12084
processQueue # angular.js:16832
(anonymous) # angular.js:16876
$digest # angular.js:17971
(anonymous) # static.js:1502
schedulerFn # core.js:4351
webpackJsonp.../../../../rxjs/_esm5/Subscriber.js.SafeSubscriber.__tryOrUnsub # Subscriber.js:240
webpackJsonp.../../../../rxjs/_esm5/Subscriber.js.SafeSubscriber.next # Subscriber.js:187
webpackJsonp.../../../../rxjs/_esm5/Subscriber.js.Subscriber._next # Subscriber.js:128
webpackJsonp.../../../../rxjs/_esm5/Subscriber.js.Subscriber.next # Subscriber.js:92
webpackJsonp.../../../../rxjs/_esm5/Subject.js.Subject.next # Subject.js:56
webpackJsonp.../../../core/esm5/core.js.EventEmitter.emit # core.js:4319
checkStable # core.js:4718
onLeave # core.js:4797
onInvokeTask # core.js:4747
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:424
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask # zone.js:192
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneTask.invokeTask # zone.js:499
ZoneTask.invoke # zone.js:488
timer # zone.js:2040
setTimeout (async)
scheduleTask # zone.js:2056
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:411
onScheduleTask # zone.js:301
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:405
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleTask # zone.js:236
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleMacroTask # zone.js:259
(anonymous) # zone.js:2072
proto.(anonymous function) # zone.js:1366
setTimeout # lodash.js:6663
timerExpired # lodash.js:10388
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:425
onInvokeTask # core.js:4744
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:424
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask # zone.js:192
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneTask.invokeTask # zone.js:499
ZoneTask.invoke # zone.js:488
timer # zone.js:2040
setTimeout (async)
scheduleTask # zone.js:2056
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:411
onScheduleTask # zone.js:301
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.scheduleTask # zone.js:405
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleTask # zone.js:236
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleMacroTask # zone.js:259
(anonymous) # zone.js:2072
proto.(anonymous function) # zone.js:1366
setTimeout # lodash.js:6663
leadingEdge # lodash.js:10358
debounced # lodash.js:10425
fn # VM445:4
$eval # angular.js:18161
(anonymous) # angular.js:25998
(anonymous) # angular.js:28813
forEach # angular.js:403
$$writeModelToScope # angular.js:28811
writeToModelIfNeeded # angular.js:28804
(anonymous) # angular.js:28798
validationDone # angular.js:28723
processAsyncValidators # angular.js:28706
$$runValidators # angular.js:28650
$$parseAndValidate # angular.js:28791
$commitViewValue # angular.js:28757
(anonymous) # angular.js:28898
$eval # angular.js:18161
$apply # angular.js:18261
$$debounceViewValueCommit # angular.js:28897
$setViewValue # angular.js:28875
listener # angular.js:24822
dispatch # jquery.js:4737
elemData.handle # jquery.js:4549
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:425
onInvokeTask # core.js:4744
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask # zone.js:424
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask # zone.js:192
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneTask.invokeTask # zone.js:499
invokeTask # zone.js:1540
globalZoneAwareCallback # zone.js:1566
(index):1 Failed to load http://example.com:8001/api/search/quickSearch?v=1.35.2664: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://example.com' is therefore not allowed access. The response had HTTP status code 404.
Here's what my Global.asax looks like to enable CORS requests:
protected void Application_BeginRequest(object sender, EventArgs e)
{
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", ConfigurationManager.AppSettings["RootUri"].TrimEnd('/'));
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST, HEAD, PUT, DELETE, OPTIONS");
HttpContext.Current.Response.AddHeader("Access-Control-Max-Age", "30");
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Credentials", "true");
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Headers", "Accept, Accept-CH, Accept-Charset, Accept-Datetime, Accept-Encoding, Accept-Ext, Accept-Features, Accept-Language, Accept-Params, Accept-Ranges, Access-Control-Allow-Credentials, Access-Control-Allow-Headers, Access-Control-Allow-Methods, Access-Control-Allow-Origin, Access-Control-Expose-Headers, Access-Control-Max-Age, Access-Control-Request-Headers, Access-Control-Request-Method, Age, Allow, Alternates, Authentication-Info, Authorization, C-Ext, C-Man, C-Opt, C-PEP, C-PEP-Info, CONNECT, Cache-Control, Compliance, Connection, Content-Base, Content-Disposition, Content-Encoding, Content-ID, Content-Language, Content-Length, Content-Location, Content-MD5, Content-Range, Content-Script-Type, Content-Security-Policy, Content-Style-Type, Content-Transfer-Encoding, Content-Type, Content-Version, Cookie, Cost, DAV, DELETE, DNT, DPR, Date, Default-Style, Delta-Base, Depth, Derived-From, Destination, Differential-ID, Digest, ETag, Expect, Expires, Ext, From, GET, GetProfile, HEAD, HTTP-date, Host, IM, If, If-Match, If-Modified-Since, If-None-Match, If-Range, If-Unmodified-Since, Keep-Alive, Label, Last-Event-ID, Last-Modified, Link, Location, Lock-Token, MIME-Version, Man, Max-Forwards, Media-Range, Message-ID, Meter, Negotiate, Non-Compliance, OPTION, OPTIONS, OWS, Opt, Optional, Ordering-Type, Origin, Overwrite, P3P, PEP, PICS-Label, POST, PUT, Pep-Info, Permanent, Position, Pragma, ProfileObject, Protocol, Protocol-Query, Protocol-Request, Proxy-Authenticate, Proxy-Authentication-Info, Proxy-Authorization, Proxy-Features, Proxy-Instruction, Public, RWS, Range, Referer, Refresh, Resolution-Hint, Resolver-Location, Retry-After, Safe, Sec-Websocket-Extensions, Sec-Websocket-Key, Sec-Websocket-Origin, Sec-Websocket-Protocol, Sec-Websocket-Version, Security-Scheme, Server, Set-Cookie, Set-Cookie2, SetProfile, SoapAction, Status, Status-URI, Strict-Transport-Security, SubOK, Subst, Surrogate-Capability, Surrogate-Control, TCN, TE, TRACE, Timeout, Title, Trailer, Transfer-Encoding, UA-Color, UA-Media, UA-Pixels, UA-Resolution, UA-Windowpixels, URI, Upgrade, User-Agent, Variant-Vary, Vary, Version, Via, Viewport-Width, WWW-Authenticate, Want-Digest, Warning, Width, X-Content-Duration, X-Content-Security-Policy, X-Content-Type-Options, X-CustomHeader, X-DNSPrefetch-Control, X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto, X-Frame-Options, X-Modified, X-OTHER, X-PING, X-PINGOTHER, X-Powered-By, X-Requested-With");
// If a preflight request, end it so we don't fetch data.
if (HttpContext.Current.Request.HttpMethod == "OPTIONS")
{
HttpContext.Current.Response.End();
}
}
Why am I getting a 404 and how can I fix it?
Chrome and Safari may also make preflight OPTIONS requests for non-GET methods (e.g. POST).
I'm not sure what ConfigurationManager.AppSettings["RootUri"].TrimEnd('/') resolves to - the ACAO response headers must either be an asterisk or (as it appears you're trying to do) an FQDN, including the scheme and port (if the port isn't 80 or 443) - so in your case, it must have an EXACT value of "http://example.com:8001". It's much simpler to simply mirror back the value of the Origin request header (which will have that value).
Can you post the request and response headers?
Same issue calling a method
$.ajax({
url:'/Home/Read'
Use
$.ajax({
url:'../Home/Read'

this.isRTL is not a function error when using paper-dropdown-menu webcomponent

Getting this error when loading up the paper-dropdown-menu webcomponent.
Uncaught TypeError: this._isRTL is not a function
Longer stacktrace for SEO:
Uncaught TypeError: this._isRTL is not a
function get _localeHorizontalAlign #
iron-dropdown.html:306_updateOverlayPosition #
iron-dropdown.html:461_positionTargetChanged #
iron-dropdown.html:405_observerEffect #
polymer.html:1562_effectEffects # polymer.html:1405_propertySetter #
polymer.html:1389setter # polymer.html:1468attached #
iron-fit-behavior.html:222_invokeBehavior #
polymer-micro.html:433_doBehavior # polymer-micro.html:426(anonymous
function) # polymer-micro.html:210_makeReady #
polymer-micro.html:111(anonymous function) # polymer-micro.html:117
polymer-mini.html:2046 Uncaught TypeError: Cannot read property
'getWidth' of undefined(anonymous function) #
app-drawer-layout.html:189complete #
polymer-mini.html:2085Debouncer.boundComplete #
polymer-mini.html:2062_atEndOfMicrotask #
polymer-mini.html:2040window.MutationObserver.observe.characterData #
polymer-mini.html:2055
Apparently Polymer 1.5 is not compatible with paper-dropdown-menu version ~1.2.1. I had to downgrade to Polymer 1.4 to use the paper-dropdown-menu.
Edit:
The problem was the this component is not compatible with the Shadow DOM.