Skip to content
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

Uncaught Exception #2

Closed
ChristinWhite opened this issue Jul 1, 2018 · 11 comments
Closed

Uncaught Exception #2

ChristinWhite opened this issue Jul 1, 2018 · 11 comments

Comments

@ChristinWhite
Copy link

ChristinWhite commented Jul 1, 2018

I'm really excited to see you've taken on this project, it definitely had some issues but was so great to use!

I switched my config from hyperterm-overlay to hyper-overlay and left my prior settings in place but I'm getting the following error any time I open Hyper, reload the window or bring up the overlay with the keyboard shortcut.

Uncaught Exception:
TypeError: Error processing argument at index 0, conversion failure from #<Object>
    at Overlay._endBounds (/Users/cwhite/.hyper_plugins/node_modules/hyper-overlay/overlay.js:331:17)
    at Overlay.show (/Users/cwhite/.hyper_plugins/node_modules/hyper-overlay/overlay.js:434:10)
    at _create (/Users/cwhite/.hyper_plugins/node_modules/hyper-overlay/overlay.js:48:14)
    at _app.createWindow (/Users/cwhite/.hyper_plugins/node_modules/hyper-overlay/overlay.js:126:9)
    at Server.Window.rpc.on (/Applications/Hyper.app/Contents/Resources/app.asar/ui/window.js:76:33)
    at emitOne (events.js:115:13)
    at Server.emit (events.js:210:7)
    at Server.ipcListener (/Applications/Hyper.app/Contents/Resources/app.asar/rpc.js:33:11)
    at emitTwo (events.js:125:13)
    at EventEmitter.emit (events.js:213:7)

Hyperterm-overlay does not throw an error.

Unless I'm missing something it looks like the config hasn't changed except possibly the hotkey set to two different options. I updated my configuration with open/close but am still getting the error.

It does not appear to get far enough to move and resize the window.

Here are my settings:

// hyperterm-overlay
		overlay: {
			alwaysOnTop   : false,     // Makes Hyperterm Overlay window stay always on top. default: `true`.
			animate       : false,     // Enable animation when show and hide the window. default: `true`.
			hasShadow     : true,      // Controls the default macOS window shadows. default: `false`.
			hideDock      : false,     // Removes the Hyper dock icon. It works only when the unique option is activated. default: `false`.
			hideOnBlur    : false,     // Hides the Hyperterm Overlay when it loses focus. default: `false`.
			position      : 'right',   // Choose where Hyperterm Overlay will be positioned: top, bottom, left or right. default: `top`.
			primaryDisplay: false,     // Show Hyperterm Overlay only on primary display. default: `false`.
			resizable     : false,     // Allow the Hyperterm Overlay be resizable. default: `false`.
			startAlone    : false,     // Makes HyperTerm Overlay the unique window displayed when started. default: `false`.
			startup       : true,      // Open HyperTerm Overlay on Hyper startup. default: `true`.
			tray          : false,     // Add icon to the system notification area, for access HyperTerm Overlay. default: `true`.
			unique        : false,     // Makes HyperTerm Overlay the unique window of Hyper. any other window will be removed. default: `false`.

			// Specify one or more hotkeys to show and hide the HyperTerm Overlay (see: Accelerator documentation). default: `['Option+Space']`
			hotkeys: {
				open : ['Control+Option+Shift+F6'],
				close: ['Control+Option+Shift+F6'],
			},

			// The size of HyperTerm Overlay when it is showing. The possible values are a `number` or a `float`. If is is a number, it represents the size im pixels. Otherwise, if it is a float, it means the percentage of the screen.
			size: 0.5,
		},

This happens both in Hyper 2.0.0 (Stable) and Canary; with and without any other plugins. macOS 10.13.5 (17F77). Here's my full config

Plugins: 
  hyperterm-paste (1.1.2),
  hyper-search (0.0.10),
  hyper-overlay (1.2.1),
  hyper-statusline (1.7.6),
  hyper-tab-icons (2.1.0),
  hypercwd (1.2.3)

If it would be helpful for troubleshooting I'm happy to jump on your Discord.

@cobrabr
Copy link

cobrabr commented Jul 4, 2018

Same happens to me, but I can circumvent it by removing the size property from the config. If I put it back, regardless of whether it's a single integer or an object with width and height, it throws the same error.

UPDATE: looks like it only happens when I assign an object to size. @christopherdwhite, it might help you pinpoint which configuration is the root for your issues if you clear out the overlay object and then re-add each property to see which one causes the error to re-occur.

@favna
Copy link
Owner

favna commented Aug 7, 2018

Sorry for not addressing this earlier, I somehow completely missed the notification. That said, make sure the size is an object as that is required in the new config to allow setting both height and width. Example config of my own:

    overlay: {
      hasShadow: true,
      hideOnBlur: true,
      position: 'center',
      tray: true,
	  size: {
        width: 0.4,
        height: 0.4
      }

Note that 0.4 on both are also the default values

@favna
Copy link
Owner

favna commented Aug 7, 2018

If this issue still persists after correcting your config please re-open it. Otherwise it will be closed for now since as far as I can tell it doesn't appear to be an issue with the plugin itself.

@favna favna closed this as completed Aug 7, 2018
@ChristinWhite
Copy link
Author

My apologies @favna, this fell off my radar but I just changed my configuration to a size object with width and height and I'm no longer getting an error. Looks like @cobrabr had nailed it. Thanks both of you guys!

@cobrabr
Copy link

cobrabr commented Aug 10, 2018

When I change my config and set size to be an object, I get the following error when I open Hyper:
screen shot 2018-08-10 at 10 24 45

If I move it back to a number, it works fine.

@favna
Copy link
Owner

favna commented Aug 10, 2018

@cobrabr can you confirm that your Hyper properly updated the plugin to the latest version by opening the package.json of the plugin folder wherever those are stored on MacOS? It should be 1.2.1

@cobrabr
Copy link

cobrabr commented Aug 13, 2018

It looks like I had both hyper-overlay and hyperterm-overlay installed (honestly, I hadn't even noticed the change in the name 😊).

I removed the old one and reinstalled hyper-overlay -- the package.json under .hyper_plugins says latest for hyper-overlay, and the package.json inside hyper-overlay's folder says 1.2.1.

@favna
Copy link
Owner

favna commented Aug 13, 2018

I had to make it a new name due to how NPM register works and I don't really feel like appealing for taking over the old project for it being abandoned (which is an option in NPM's publishing rules).

Good you found out why then.

@cobrabr
Copy link

cobrabr commented Aug 13, 2018

Oh, it's still failing... I'm trying to re-pinpoint which configuration option is actually throwing things off.

@cobrabr
Copy link

cobrabr commented Aug 13, 2018

It looks like it's the hotkeys option -- have it set to ['Super+`'], which worked fine with the old version, but seems to be failing with the new one.

@cobrabr
Copy link

cobrabr commented Aug 13, 2018

Sorry for the spam, but I think it's finally OK: looking at some other issues, I found that hotkeys is also an object now, with open and close as properties. I've changed my config to that, and it's now working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants