New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension dialogs have stopped working #1724

Closed
abist opened this Issue Jun 25, 2018 · 7 comments

Comments

Projects
None yet
4 participants
@abist
Member

abist commented Jun 25, 2018

After merging master to our branch with the recent commonService changes, the dialogs have stopped working. Here's the error -

  ERR Cannot read property 'connectionProfile' of undefined: TypeError: Cannot read property 'connectionProfile' of undefined
zone-node.js:388
    at ModelViewContent.get (file:///C:/Users/adbist/Desktop/SQL_Tools/sqlopsstudio/out/sql/parts/modelComponents/modelViewContent.component.js:66:103)
    at ModelViewContent.descriptor.(anonymous function) [as connection] (file:///C:/Users/adbist/Desktop/SQL_Tools/sqlopsstudio/out/vs/base/common/decorators.js:55:31)
    at file:///C:/Users/adbist/Desktop/SQL_Tools/sqlopsstudio/out/sql/workbench/api/node/mainThreadModelView.js:38:73
    at Emitter.fire (file:///C:/Users/adbist/Desktop/SQL_Tools/sqlopsstudio/out/vs/base/common/event.js:103:38)
    at ModelViewService.registerModelView (file:///C:/Users/adbist/Desktop/SQL_Tools/sqlopsstudio/out/sql/services/modelComponents/modelViewServiceImpl.js:14:41)
    at ModelViewContent.ngOnInit (file:///C:/Users/adbist/Desktop/SQL_Tools/sqlopsstudio/out/sql/parts/modelComponents/modelViewContent.component.js:42:35)
    at checkAndUpdateDirectiveInline (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:10822:19)
    at checkAndUpdateNodeInline (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12245:17)
    at checkAndUpdateNode (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12184:16)
    at debugCheckAndUpdateNode (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12887:59)
    at debugCheckDirectivesFn (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12828:13)
    at Object.eval [as updateDirectives] (ng:///ModuleClass/DialogContainer.ngfactory.js:35:5)
    at Object.debugUpdateDirectives [as updateDirectives] (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12813:21)
    at checkAndUpdateView (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12151:14)
    at callViewAction (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12514:21)
    at execComponentViewsAction (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12446:13)
    at checkAndUpdateView (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12151:14)
    at callViewAction (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12514:21)
    at execComponentViewsAction (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12446:13)
    at checkAndUpdateView (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12157:5)
    at callWithDebugContext (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:13213:42)
    at Object.debugCheckAndUpdateView [as checkAndUpdateView] (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:12753:12)
    at ViewRef_.detectChanges (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:10225:63)
    at C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:5082:63
    at Array.forEach (native)
    at ApplicationRef_.tick (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:5082:25)
    at ApplicationRef_._loadComponent (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:5058:14)
    at ApplicationRef_.bootstrap (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:5046:14)
    at ModuleClass.ngDoBootstrap (file:///C:/Users/adbist/Desktop/SQL_Tools/sqlopsstudio/out/sql/platform/dialog/dialog.module.js:28:24)
    at PlatformRef_._moduleDoBootstrap (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:4831:32)
    at C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:4790:27
    at ZoneDelegate.invoke (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\zone.js\dist\zone-node.js:388:26)
    at Object.onInvoke (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:4156:37)
    at ZoneDelegate.invoke (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\zone.js\dist\zone-node.js:387:32)
    at Zone.run (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\zone.js\dist\zone-node.js:138:43)
    at C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\zone.js\dist\zone-node.js:858:57
    at ZoneDelegate.invokeTask (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\zone.js\dist\zone-node.js:421:31)
    at Object.onInvokeTask (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\@angular\core\bundles\core.umd.js:4147:37)
    at ZoneDelegate.invokeTask (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\zone.js\dist\zone-node.js:420:36)
    at Zone.runTask (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\zone.js\dist\zone-node.js:188:47)
    at drainMicroTaskQueue (C:\Users\adbist\Desktop\SQL_Tools\sqlopsstudio\node_modules\zone.js\dist\zone-node.js:595:35)
    at <anonymous>
@anthonydresser

This comment has been minimized.

Member

anthonydresser commented Jun 26, 2018

Can you give me a repro

@abist

This comment has been minimized.

Member

abist commented Jun 26, 2018

@anthonydresser click on the new job or new job step button in SQL Agent

@anthonydresser

This comment has been minimized.

Member

anthonydresser commented Jun 26, 2018

on master?

@abist

This comment has been minimized.

Member

abist commented Jun 26, 2018

@kburtram

This comment has been minimized.

Member

kburtram commented Jun 26, 2018

@anthonydresser it looks like the _uri parameter in SingleConnectionManagementService is now null cause connection info look up to fail.

@abist you can temporarily revert 473ddfc to unblock yourself while the issue is being investigated.

@MattIrv

This comment has been minimized.

Member

MattIrv commented Jun 26, 2018

This repros for me too. It looks like there's a URI parameter that the SingleConnectionManagementService is expecting to be included in our call to bootstrapAngular in dialogPane.ts but isn't actually required as part of that call.

There's also a bug in modelViewContent.component.ts where we try to use the connectionInfo from the connection management service even if it's undefined.

I'll make a quick PR to fix that second issue. The first one is a bit trickier because I'm not sure where we would get a URI from for most dialogs.

@abist

This comment has been minimized.

Member

abist commented Jun 29, 2018

@anthonydresser @MattIrv @kburtram I think the scenario right now is fine. We do get the ownerURI when we open the New Step Dialog, the proper intended way by clicking the New Step button. We don't get the ownerURI only when we use the command palette to open the dialog. I only added that for testing purposes and will get rid of it. However, Kevin suggested in future maybe we can try to get context to support most commands using the palette.

@kburtram kburtram closed this Jul 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment