Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

client functions don't seem to be working #48

Open
mpelzsherman opened this issue May 14, 2020 · 9 comments
Open

client functions don't seem to be working #48

mpelzsherman opened this issue May 14, 2020 · 9 comments

Comments

@mpelzsherman
Copy link

I'm getting empty arrays from both listenXHR and waitForXHR.

It looks like the clientListen function isn't getting called.

I tried uncommenting this console.warn:

    api.execute(_client.clientListen, [], function (res) {
        console.warn('Listening XHR requests');
    });

... and I see the message, but I added some more console.log messages in client.js and the clientListen function is not being called.

Is this project being actively maintained? We would love to use it but there seem to be some pretty major bugs in it. Thanks!

@procyon-chao
Copy link

Also interested

@mpelzsherman
Copy link
Author

I should add that we've realized this lib won't work for us because we are using the JS fetch API which does not use XmlHttpRequest.

The basic approach of "monkey-patching" XmlHttpRequest does work fine for XHR requests though. I just wasn't able to get it working.

@Pieras2
Copy link

Pieras2 commented May 19, 2020 via email

@procyon-chao
Copy link

I should add that we've realized this lib won't work for us because we are using the JS fetch API which does not use XmlHttpRequest.

The basic approach of "monkey-patching" XmlHttpRequest does work fine for XHR requests though. I just wasn't able to get it working.

Were you able to find a better library?

@mpelzsherman
Copy link
Author

Were you able to find a better library?

No, we ended up using a different solution.

@Pieras2 sorry I'm not sure what you are asking. Sounds like neither of us was able to get this working.

@Pieras2
Copy link

Pieras2 commented May 19, 2020 via email

@Pieras2
Copy link

Pieras2 commented May 19, 2020 via email

@procyon-chao
Copy link

Fixed my issue. It was pretty silly- I didn't read the documentation close enough and thought these lines were the same. I changed to the es5 configuration and it all works fine now.

image

@Pieras2
Copy link

Pieras2 commented May 20, 2020

Fixed my issue. It was pretty silly- I didn't read the documentation close enough and thought these lines were the same. I changed to the es5 configuration and it all works fine now.

image

Lucky You :)

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

No branches or pull requests

3 participants