plugbotapi icon indicating copy to clipboard operation
plugbotapi copied to clipboard

New Plug Version Breaks API

Open webdevbrian opened this issue 11 years ago • 122 comments

I know it hasn't been updated yet but I figured I'd get a convo going. :)

My error is "TypeError: Cannot read property 'attribs' of undefined" in the plug-dj-login/index.js file on line 79

webdevbrian avatar Aug 28 '14 21:08 webdevbrian

On it!

atomjack avatar Aug 28 '14 21:08 atomjack

Haha take your time bro - I know this is totally knew I just figured I'd start a convo.

Seriously if you have a paypal donate button anywhere let me know - can't thank you enough for being on top of this API the way you are man.

Blessings! Good luck!

webdevbrian avatar Aug 28 '14 21:08 webdevbrian

Yeah, everything he said :)

nugget avatar Aug 28 '14 21:08 nugget

Indeed! Y'all are great. Regardless of what the trolls say. ;)

hoofborne avatar Aug 28 '14 21:08 hoofborne

Hahaha.

So happy atomjack's API is so widely used with some other humorous devs. I'm the bot dev behind reggae-for-all-2 if anyone else is wondering.

While atom's plugging away - what are y'all's rooms that you maintain the bots for?

my username is webdevbrian (spoiler alert!)

Also - @atomjack I'm not kidding about the donate link if you have one bro. :) :thumbsup:

webdevbrian avatar Aug 28 '14 21:08 webdevbrian

cowgod bot in Pit of No Shame (not open source)

nugget avatar Aug 28 '14 21:08 nugget

lol thanks @webdevbrian my paypal is atomjack at gmail :)

atomjack avatar Aug 28 '14 22:08 atomjack

Paste this somewhere bro (setup a github.io page for the API and slap this on it)

http://d.pr/n/aQXH/2OyVhW2u

webdevbrian avatar Aug 28 '14 22:08 webdevbrian

Just sent $50 - thanks man!

webdevbrian avatar Aug 28 '14 22:08 webdevbrian

Dayum! Thanks guys!

atomjack avatar Aug 28 '14 22:08 atomjack

Ugh. Back in maintenance mode.

atomjack avatar Aug 28 '14 22:08 atomjack

LOL just noticed that myself

webdevbrian avatar Aug 28 '14 22:08 webdevbrian

The new site is not playing nice with phantomjs. It seems to get stuck at the little spinner thing. No matter how long I wait it doesn't get beyond that.

atomjack avatar Aug 29 '14 04:08 atomjack

That's the anti-DoS service they added I think.

nugget avatar Aug 29 '14 04:08 nugget

I'm able to get phantomjs to at least render the main page with a basic test script. Are you saying you can't even get that far?

var page = require('webpage').create();
page.open('https://plug.dj/', function() {
    page.render('example.png');
phantom.exit();
});

That gives me a good-looking example.png

nugget avatar Aug 29 '14 04:08 nugget

Oh, I see they moved the spinner thing to room join, so my test doesn't really involve it.

nugget avatar Aug 29 '14 05:08 nugget

Yeah, I logged in manually then copied some of the cookies and had phantom add them before calling the page to load a room, but it just hangs at the spinner.

atomjack avatar Aug 29 '14 05:08 atomjack

I've been getting either the script hanging silently on connect or giving this error then hanging, if it helps. I use FB to authenticate, and I haven't updated the cookie yet because I can't find the old usr cookie.

debug: The "fb-root" div has not been created, auto-creating

ImGrumpy avatar Aug 29 '14 09:08 ImGrumpy

hmmmmm

webdevbrian avatar Aug 30 '14 15:08 webdevbrian

How pessimistic should I be? I'm contemplating just accepting defeat and restructuring my code to be a browser-based bot. Would be a total pain because I'm doing all sorts of other node-ly things with a database back end, but it's not completely infeasible.

nugget avatar Sep 02 '14 19:09 nugget

I'm totally waiting out for this API. I have hundreds of hours invested in my room bot, and like you said - I have a huge database backend that I just can't give up.

Beliieevvveeeee

webdevbrian avatar Sep 02 '14 19:09 webdevbrian

My thought was that I could migrate to bot-based and just create a REST API to get to my database. Wouldn't be /too/ awful, but it's definitely tens of hours of work and then I've got to keep a browser up and running in a VM for the bot, which is a lot less handy than running inside screen.

nugget avatar Sep 02 '14 19:09 nugget

I've been in touch with someone at Plug, and he said they appreciate the thought and creativity that has gone into creating bots on the service. I've also asked him to ask the developers for some information on what they are using for the initial loading of a room (i.e. what is going on in the background when the spinner shows up as well as the "plugging you in" thing, before the room actually loads). I'm hoping we can get the name(s) of the technologies being used so that we can figure out how to get phantomjs to play nicely with it. He said they are pretty busy with stability issues (which I completely understand) but he said he would run my questions by them sometime this week. I'll keep you all posted.

atomjack avatar Sep 02 '14 19:09 atomjack

You're the man Chris.

webdevbrian avatar Sep 02 '14 19:09 webdevbrian

Yeah, they seem more than a little bit overwhelmed right now. Nice to hear that there's a discussion, that goes a long way towards my patience. Thanks, Chris!

nugget avatar Sep 02 '14 19:09 nugget

I can't shake the feeling that if they haven't answered yet, they're probably not going to. We know they don't really like Node.JS bots for whatever reason, that's why the project switched over to PhantomJS in the first place... Maybe I'm just paranoid.

ImGrumpy avatar Sep 04 '14 20:09 ImGrumpy

I have faith in Chris - dude's pretty good with phantom. Obviously the only thing that stinks is just waiting for the api to be updated.

but - since I have so much work tied up with using this API it doesn't make any sense starting from scratch anymore. I just wish there was more I could do from my end!

webdevbrian avatar Sep 05 '14 14:09 webdevbrian

Oh, me too, I didn't mean to suggest otherwise - I just don't have faith in Plug's willingness to help out on this one. I just get the very strong feeling this has to be done without their assistance.

ImGrumpy avatar Sep 05 '14 15:09 ImGrumpy

Haha no I totally agree with you. That's why I created spinit.fm. In the meantime though - I'll be using their service to create better one. Huzzah :)

webdevbrian avatar Sep 05 '14 15:09 webdevbrian

Just a little update. I did hear back from my contact at plug although haven't quite gotten any information yet. I elaborated on what info I need from the developers so hopefully I'll hear back soon.

atomjack avatar Sep 08 '14 17:09 atomjack