Cannot create a Node.js proxy, JS errors when activating CORS

Not applicable

When creating a new Node.js API proxy and activating CORS, I get JS errors at the "Generating proxy..." step.

Error: c is undefined
V@https://enterprise.apigee.com/platform/scripts/8ddf157b.scripts.js:16:4276
ka.generateProxy/<@https://enterprise.apigee.com/platform/scripts/8ddf157b.scripts.js:16:11179
i@https://enterprise.apigee.com/platform/scripts/8af5cf44.components.js:5:24951
j/<@https://enterprise.apigee.com/platform/scripts/8af5cf44.components.js:5:25123
Wb/this.$get</n.prototype.$eval@https://enterprise.apigee.com/platform/scripts/8af5cf44.components.js:6:505
Wb/this.$get</n.prototype.$digest@https://enterprise.apigee.com/platform/scripts/8af5cf44.components.js:5:31016
Wb/this.$get</n.prototype.$apply@https://enterprise.apigee.com/platform/scripts/8af5cf44.components.js:6:774
f/j<@https://enterprise.apigee.com/platform/scripts/8af5cf44.components.js:6:8027
g@https://enterprise.apigee.com/platform/scripts/8af5cf44.components.js:4:18158
Va/p.defer/c<@https://enterprise.apigee.com/platform/scripts/8af5cf44.components.js:4:20270
1 8af5cf44.components.js:5:19444
e/<() 8af5cf44.components.js:5
<anonyme> 8ddf157b.scripts.js:1
i() 8af5cf44.components.js:5
j/<() 8af5cf44.components.js:5
Wb/this.$get</n.prototype.$eval() 8af5cf44.components.js:6
Wb/this.$get</n.prototype.$digest() 8af5cf44.components.js:5
Wb/this.$get</n.prototype.$apply() 8af5cf44.components.js:6
f/j<() 8af5cf44.components.js:6
g() 8af5cf44.components.js:4
Va/p.defer/c<() 8af5cf44.components.js:4

And right after, syntax errors.

Here is a screenshot:

2568-screen-shot-2016-04-27-at-095800.png

No network requests are made, and after 1 hour still nothing happens.

EDIT: tried with Chrome, I get this:

TypeError: Cannot read property 'preFlow' of undefined
    at V (8ddf157b.scripts.js:16)
    at 8ddf157b.scripts.js:16
    at i (8af5cf44.components.js:5)
    at 8af5cf44.components.js:5
    at n.$eval (8af5cf44.components.js:6)
    at n.$digest (8af5cf44.components.js:5)
    at n.$apply (8af5cf44.components.js:6)
    at 8af5cf44.components.js:6
    at g (8af5cf44.components.js:4)
    at 8af5cf44.components.js:4
(anonymous function) @ 8af5cf44.components.js:5
1 14 177
14 REPLIES 14

@emersion , Welcome to Apigee Community 🙂

Are you using Apigee cloud ? I can able to create Node.JS proxy sucessfully. Are you importing existing node application ?

I use enterprise.apigee.com. I don't import an existing Node.JS app. The bug occurs if I try to use a Swagger YAML file but also if I don't. I've been trying yesterday and today, same results.

I'm using Firefox 45.

@emersion , I just created sample hello world node api proxy using chrome & working fine. Let me check in firefox.

Just tried with Chrome, and I get another error. See my updated question.

See proxy creation steps that worked for me,

2573-nodeexample.jpg

@emersion , Are you selecting any other options like CORS / Security etc ?

Just figured out that the CORS option is triggering errors. It works without it.

Still, I won't accept this as an answer, sicne I want to activate CORS.

@emersion , Agree , It's an issue, I just don't want to hide this information in hidden comments, that's the reason i posted same as an answer 🙂 . Converting same to comment back & updating the question to reflect actual issue.

I can able to reproduce same & it's a bug. Let me file a bug request with Engineering team. We will keep you updated. For now, Create CORS policy manually after creating proxy.

Thanks! 🙂

Not applicable

I'm still getting the same JS bug. Same options seem to work without CORS box being ticked.

2926-apigee-bug.png

@Nick Moore , Welcome to Apigee Community.

As a workaround, you can create a proxy without CORS & then add CORS functionality using developer tab. You can find documentation here. Keep us posted if you have any queries while implementing same.

Yep, that has worked but not a good look!