Saitama
For me the error is "Cannot read property 'c2obj' of undefined".
Looking at your event, when you create the joint you set "Object2 UID" to 2.
The wire does have a uid of 2 but it doesn't have the chipmunk behavior. You can only create joints between objects with the chipmunk behavior.
In my example I used -1 for "object2 uid". That means just connect to a fixed location on the layout. The wire in my example didn't have the physics behavior either, it was just for a visual.