Eugeny / tabby

A terminal for a more modern age
https://tabby.sh
MIT License
59.41k stars 3.39k forks source link

Per SSH profile setting doesn't take effect #9507

Open zorrohahaha opened 8 months ago

zorrohahaha commented 8 months ago

Describe the problem: Per SSH profile setting doesn't take effect.

To Reproduce: Create a new SSH profile and choose any color scheme from the 4th tab and save. Even after restarting the application, when connect to the remote host with this profile, the termanial will always use the default one.

0v4cgiji commented 2 months ago

It looks like the same issue I am facing.

I also tried clearing the default color (Profiles & connections > Advanced > SSH > Colors). It causes the colors tab on individual profiles to not load. When I click on it, the tab is selected, but the content is not loaded.

tabby_colors_bug

While still having no default color, if I try to connect to a profile, a new SSH tab will open (as expected), but nothing will show up on the terminal. It will connect and display the output if I click anywhere on the terminal area or switch to another tab.

OS: Windows 10 Tabby version: 1.0.211

Eugeny commented 2 months ago

Please capture DevTools console logs at the time of the issue: https://github.com/Eugeny/terminus/wiki/Debug-logs

GitHub
Debug logs
A terminal for a more modern age. Contribute to Eugeny/tabby development by creating an account on GitHub.
0v4cgiji commented 2 months ago

When the color tab fails to load, this is the error I get:

ERROR TypeError: Cannot read properties of undefined (reading '2') ```js ERROR TypeError: Cannot read properties of undefined (reading '2') at ColorSchemePreviewComponent_Template (template.html:3:14) at executeTemplate (shared.ts:496:5) at refreshView (shared.ts:369:7) at refreshComponent (shared.ts:1613:7) at refreshChildComponents (shared.ts:109:5) at refreshView (shared.ts:426:7) at refreshEmbeddedViews (shared.ts:1563:9) at refreshView (shared.ts:396:5) at refreshComponent (shared.ts:1613:7) at refreshChildComponents (shared.ts:109:5) at refreshView (shared.ts:426:7) at refreshEmbeddedViews (shared.ts:1563:9) at refreshView (shared.ts:396:5) at refreshEmbeddedViews (shared.ts:1563:9) at refreshView (shared.ts:396:5) at refreshEmbeddedViews (shared.ts:1563:9) at refreshView (shared.ts:396:5) at refreshComponent (shared.ts:1613:7) at refreshChildComponents (shared.ts:109:5) at refreshView (shared.ts:426:7) at refreshComponent (shared.ts:1613:7) at refreshChildComponents (shared.ts:109:5) at refreshView (shared.ts:426:7) at refreshEmbeddedViews (shared.ts:1563:9) at refreshView (shared.ts:396:5) at refreshEmbeddedViews (shared.ts:1563:9) at refreshView (shared.ts:396:5) at refreshComponent (shared.ts:1613:7) at refreshChildComponents (shared.ts:109:5) at refreshView (shared.ts:426:7) at detectChangesInternal (shared.ts:1768:5) at RootViewRef.detectChanges (view_ref.ts:321:5) at ApplicationRef.tick (application_ref.ts:1028:14) at application_ref.ts:785:16 at _ZoneDelegate.invoke (zone.js:368:26) at Object.onInvoke (ng_zone.ts:423:29) at _ZoneDelegate.invoke (zone.js:367:52) at Zone.run (zone.js:127:43) at NgZone.run (ng_zone.ts:202:50) at Object.next (application_ref.ts:784:20) at ConsumerObserver.next (Subscriber.ts:161:25) at Subscriber._next (Subscriber.ts:119:22) at Subscriber.next (Subscriber.ts:75:12) at Subject.ts:68:20 at Object.errorContext (errorContext.ts:29:5) at Subject.next (Subject.ts:61:5) at EventEmitter_.emit (event_emitter.ts:114:11) at checkStable (ng_zone.ts:341:29) at Object.onHasTask (ng_zone.ts:441:15) at _ZoneDelegate.hasTask (zone.js:422:37) ```

While testing things to reproduce this bug, another bug happened. I suppose this is the original bug @zorrohahaha was facing. Sometimes, I can select the Colors tab, and its content loads. But clearing or changing the color gives errors.

If I clear the color them, this error occurs:

error_handler.ts:45 ERROR TypeError: Cannot set property terminalColorScheme of [object Object] ```js error_handler.ts:45 ERROR TypeError: Cannot set property terminalColorScheme of [object Object] which has only a getter at SSHProfileSettingsComponent_ng_template_21_Template_color_scheme_selector_modelChange_0_listener (template.html:218:41) at executeListenerWithErrorHandling (listener.ts:224:12) at Object.wrapListenerIn_markDirtyAndPreventDefault [as next] (listener.ts:261:18) at ConsumerObserver.next (Subscriber.ts:161:25) at Subscriber._next (Subscriber.ts:119:22) at Subscriber.next (Subscriber.ts:75:12) at Subject.ts:68:20 at Object.errorContext (errorContext.ts:29:5) at Subject.next (Subject.ts:61:5) at EventEmitter_.emit (event_emitter.ts:114:11) at ColorSchemeSelectorComponent.selectScheme (C:\Users\...\AppData\Local\Programs\Tabby\resources\builtin-plugins\tabby-terminal\dist\index.js:40742:26) at ColorSchemeSelectorComponent_div_1_Template_a_click_5_listener (template.html:5:54) at executeListenerWithErrorHandling (listener.ts:224:12) at wrapListenerIn_markDirtyAndPreventDefault (listener.ts:261:18) at HTMLAnchorElement. (dom_renderer.ts:76:34) at _ZoneDelegate.invokeTask (zone.js:402:31) at Object.onInvokeTask (ng_zone.ts:408:29) at _ZoneDelegate.invokeTask (zone.js:401:60) at Zone.runTask (zone.js:171:47) at ZoneTask.invokeTask [as invoke] (zone.js:483:34) at invokeTask (zone.js:1631:18) at globalCallback (zone.js:1662:29) at HTMLAnchorElement.globalZoneAwareCallback (zone.js:1695:16) at HTMLAnchorElement.sentryWrapped (helpers.ts:87:17) ```

If I try to select a different theme, it gives this error:

ERROR TypeError: Cannot set property terminalColorScheme of [object Object] which has only a getter ```js ERROR TypeError: Cannot set property terminalColorScheme of [object Object] which has only a getter at SSHProfileSettingsComponent_ng_template_21_Template_color_scheme_selector_modelChange_0_listener (template.html:218:41) at executeListenerWithErrorHandling (listener.ts:224:12) at Object.wrapListenerIn_markDirtyAndPreventDefault [as next] (listener.ts:261:18) at ConsumerObserver.next (Subscriber.ts:161:25) at Subscriber._next (Subscriber.ts:119:22) at Subscriber.next (Subscriber.ts:75:12) at Subject.ts:68:20 at Object.errorContext (errorContext.ts:29:5) at Subject.next (Subject.ts:61:5) at EventEmitter_.emit (event_emitter.ts:114:11) at ColorSchemeSelectorComponent.selectScheme (C:\Users\...\AppData\Local\Programs\Tabby\resources\builtin-plugins\tabby-terminal\dist\index.js:40742:26) at ColorSchemeSelectorComponent_ng_container_9_Template_div_click_1_listener (template.html:17:155) at executeListenerWithErrorHandling (listener.ts:224:12) at wrapListenerIn_markDirtyAndPreventDefault (listener.ts:261:18) at HTMLDivElement. (dom_renderer.ts:76:34) at _ZoneDelegate.invokeTask (zone.js:402:31) at Object.onInvokeTask (ng_zone.ts:408:29) at _ZoneDelegate.invokeTask (zone.js:401:60) at Zone.runTask (zone.js:171:47) at ZoneTask.invokeTask [as invoke] (zone.js:483:34) at invokeTask (zone.js:1631:18) at globalCallback (zone.js:1662:29) at HTMLDivElement.globalZoneAwareCallback (zone.js:1695:16) at HTMLDivElement.sentryWrapped (helpers.ts:87:17) ```

It fails to save the changes, and perhaps that is why the color settings don't take effect.