bitfocus / companion-module-canon-ptz

MIT License
9 stars 6 forks source link

Error "API is not defined" #19

Closed bartatwork closed 1 year ago

bartatwork commented 1 year ago

When trying to connect the Canon PTZ module in Companion 3 beta, the Status column keeps stating error. I triple checked the camera's IP address; it is correct. Nothing appears in the log file, so I can't share more details on what causes the error.

Buttons with a Canon PTZ action tied to them do write something to the log, but all messages are the same: 23.03.29 10:44:58 Instance/Wrapper/canon-ptz: An error has occurred: ReferenceError: API is not defined

My setup: MacBook Pro M1 Max 2021 MacOS Ventura 13.2.1 Companion 3.0.0 (3.0.0+5764-beta-665fc377)

Companion 2.4 and the version of the Canon PTZ module that came with it run flawlessly.

Let me know if you need more details and/or testing to figure out what is causing this.

josephdadams commented 1 year ago

I think I found this bug and I will push a new version. Can you watch for that new version and then try it? It will be v2.0.1 of the module.

davidjoshuaford commented 1 year ago

In v2.0.1, running Companion Arm build 5783 on Macbook M1 Max,

I'm also finding that the module is showing "error" on startup.

The Action buttons still connect and operate the camera, but there is no feedback coming back.

Screenshot 2023-04-11 at 3 28 55 PM Screenshot 2023-04-11 at 3 27 09 PM Screenshot 2023-04-11 at 3 28 34 PM
davidjoshuaford commented 1 year ago

FYI, I keep reverting back to v1.1.1 in Companion 5746, which is the most recent beta that I've been able to operate without the error message and shows correct feedback states and variable values.

josephdadams commented 1 year ago

It’s probably the same bug from Actions, except in Feedbacks. I can take a look. I wrote the module when Canon sent me a unit, I don’t have one now to test against.

davidjoshuaford commented 1 year ago

Happy to test for you!

josephdadams commented 1 year ago

Can you open the console output for this module ( >_ ) and send me anything applicable there?

bartatwork commented 1 year ago

I was able to do some testing with the latest Companion build today (3.1.0 (3.1.0+5771-develop-38212c26)) While the connection status still lists 'Error', PTZ control does seem to work. However, most button presets are completely blank (no button text and no actions in them). When creating an action manually, it works. The log doesn't show much useful info I'm afraid. These errors appeared after clicking "pan left", "pan right" and "pan stop". All other working actions result in the same.

Screenshot 2023-04-19 at 16 03 17 Screenshot 2023-04-19 at 16 02 59
ccxmedia commented 1 year ago

I too am experiencing the same error warning with no apparent log information available. We are excited at the possibility of using this to control our Canon XF605's. Is there any other information that I can try and gather to assist with troubleshooting?

MacBook Pro M1 Max 2021 MacOS Ventura 13.3.1 Companion 3.0.0 (3.0.0+5815-beta-a3f0d852) Canon XF605

josephdadams commented 1 year ago

Without access to a compatible device, I can't really fix this. If you want to reach out to me via email, maybe I can help. My email address is on my github profile.

ccxmedia commented 1 year ago

I will reach out to you soon via email.

davidjoshuaford commented 1 year ago

Hi Joseph, some progress and some errors still reporting -

Screenshot 2023-06-13 at 5 14 08 PM Screenshot 2023-06-13 at 5 10 56 PM