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

MacOS: Pressing buttons on profile has no effect, buttons off-profile prompt to install custom profile. #13

Open
trevor-coleman opened this issue Jul 7, 2023 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@trevor-coleman
Copy link

Using a Streamdeck XL. I tried installing the plugin from the store (1.0.0) and from the releases page (1.0.1) and both were the same. Watching FP1 at silverstone.

Summary

The plugin connects to multiviewer and loads the driver pictures, but none of the buttons work. Seems to be an issue with the context object.

System Info

General

  • MacOS M1 Max

StreamDeck

  • Stream Deck XL
  • Firmware 1.01.000)
  • Latest software: 6.3.0 (18948)
  • The plugin in streamdeck is connected (and I verified this by changing the IP)

Multiviewer

  • Version 1.22.2

Custom profile:

  • Driver buttons on the custom profile all populate correctly, and display the driver photos.
  • Pressing the buttons seems to have no effect. I tried this with a single stream, many streams, no streams open

Errors

When I first switch to the custom profile I get this is the console:

Setting context for Next Page to 
(6x) app.js:911 Uncaught TypeError: Cannot read properties of undefined (reading 'tla')
    at app.js:911:49
    at action.js:72:57
    at events.js:33:49
    at Set.forEach (<anonymous>)
    at Object.pub (events.js:33:35)
    at ELGSDStreamDeck.emit (events.js:18:75)
    at websocket.onmessage (api.js:232:48)
(anonymous) @ app.js:911
(anonymous) @ action.js:72
(anonymous) @ events.js:33
pub @ events.js:33
emit @ events.js:18
websocket.onmessage @ api.js:232
app.js:911 setting context for HUL to 
app.js:911 setting context for MAG to 
app.js:911 setting context for BOT to 
app.js:911 setting context for SAR to 
app.js:911 setting context for ZHO to 
app.js:911 setting context for DEV to 
app.js:911 setting context for STR to 
app.js:911 setting context for ALB to 
app.js:911 setting context for PIA to 
app.js:911 setting context for RUS to 5
app.js:911 setting context for SAI to 4
app.js:911 setting context for HAM to 8
app.js:911 setting context for OCO to 14
app.js:911 setting context for TSU to 15
app.js:911 setting context for LEC to 12
app.js:911 setting context for ALO to 11
app.js:911 Uncaught TypeError: Cannot read properties of undefined (reading 'tla')
    at app.js:911:49
    at action.js:72:57
    at events.js:33:49
    at Set.forEach (<anonymous>)
    at Object.pub (events.js:33:35)
    at ELGSDStreamDeck.emit (events.js:18:75)
    at websocket.onmessage (api.js:232:48)
(anonymous) @ app.js:911
(anonymous) @ action.js:72
(anonymous) @ events.js:33
pub @ events.js:33
emit @ events.js:18
websocket.onmessage @ api.js:232
app.js:911 setting context for PER to 10
app.js:911 setting context for GAS to 7
app.js:911 setting context for NOR to 9
app.js:911 setting context for VER to 6
app.js:911 setting context for INTERNATIONAL to 
app.js:911 setting context for DATA to 13
app.js:911 setting context for TRACKER to 3
app.js:911 setting context for F1 LIVE to 2

Then when I press a driver button:

Uncaught TypeError: Cannot read properties of undefined (reading 'pages')
    at app.js:948:56
    at action.js:46:54
    at events.js:33:49
    at Set.forEach (<anonymous>)
    at Object.pub (events.js:33:35)
    at ELGSDStreamDeck.emit (events.js:18:75)
    at websocket.onmessage (api.js:232:48)

Actions in default profile

  • Added some other buttons (fullscreen toggle, toggle telemetry) to my default profile and they pop up a dialog asking if I want to install the custom profile.
CleanShot 2023-07-07 at 11 37 42@2x

Errors

  • No matter which button I press I get one of these for each driver in console:
new_driver: {"number":"27","tla":"HUL","firstName":"Nico","lastName":"Hulkenberg","teamName":"Haas F1 Team","headshot":" [...omitted base64 string]","place":19,"id":"","type":"OBC","context":""}
app.js:896 Error setting title or image for tile due to no context. TLA: HUL

and then

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'context')
    at updateProfileIcons (app.js:887:23)
    at app.js:844:9
updateProfileIcons @ app.js:887
(anonymous) @ app.js:844
Promise.then (async)
showPlayerTiles @ app.js:702
(anonymous) @ app.js:992
(anonymous) @ action.js:59
(anonymous) @ events.js:33
pub @ events.js:33
emit @ events.js:18
websocket.onmessage @ api.js:232
@trevor-coleman
Copy link
Author

Ah looks like this might be part of it -- most of the actions have "Show player tiles" as the action. Which is why it's prompting to change to the player tiles.

Speedometer.onKeyUp(({ action, context, device, event, payload }) => {
    showPlayerTiles(device, action, payload);
});

@trevor-coleman
Copy link
Author

I noticed a couple places you are comparing to empty objects and arrays like this:

if (x === {} || x === []) 

both of those conditions will always be false -- javascript === compares objects and arrays by reference -- so you are comparing to a new empty object and a new empty array each time.

@jonahhb jonahhb self-assigned this Feb 11, 2024
@jonahhb jonahhb added the bug Something isn't working label Feb 11, 2024
@jonahhb jonahhb added this to the In Progress milestone Feb 11, 2024
jonahhb added a commit that referenced this issue Feb 11, 2024
…now so when people beta test we can make sure the small change didn't break anything
@jonahhb
Copy link
Collaborator

jonahhb commented Feb 11, 2024

Release 1.0.3 (coming soon) might fix some if not all of this as it had a significant overlap with #14.

@trevor-coleman
Copy link
Author

Awesome sauce! Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants