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

Fatal error when getting snaps #9

Open
mattiz opened this issue Feb 26, 2014 · 16 comments
Open

Fatal error when getting snaps #9

mattiz opened this issue Feb 26, 2014 · 16 comments

Comments

@mattiz
Copy link

mattiz commented Feb 26, 2014

Hi,

When i run the following code on my machine, I get an fatal error. It worked fine until two days ago.

$snapchat = new Snapchat( SNAP_USER, SNAP_PASS );
$snaps = $snapchat->getSnaps();

Fatal error: Call to a member function get() on a non-object in /www-root/lib/snapchat.php on line 234

Any help would be appreciated!

@dprogramming
Copy link

Have you tried using a clean version of this library? Otherwise you might have the same issue as here #3

@mattiz
Copy link
Author

mattiz commented Feb 26, 2014

I've downloaded the newest version, but I still get the same error.

I guess the snapchat server could have blacklisted my IP address, but it's hard to tell from this error message.

Any ideas?

@dprogramming
Copy link

It's indeed hard to tell from the error message you get. You can check if you still have this problem when you test your code through a vpn. If you're hosting this library on localhost you can install SurfEasy VPN ( https://www.surfeasy.com/ ), you'll get a free amount of bandwith.
Note: you have to use a VPN on the server side, your server needs a new IP, not on the client side.

Do you still have the problem then?

@dprogramming
Copy link

Sorry, I pasted a wrong url, you need this one: https://www.surfeasy.com/ . (I also edited the previous comment.)

@mattiz
Copy link
Author

mattiz commented Feb 28, 2014

The error message was caused by wrong file permissions on some of the snapchat library files.

I'm sorry for your inconvenience.

@mattiz mattiz closed this as completed Feb 28, 2014
@MatthewHallCom
Copy link

What was the required file permissions? This just started happening to us as well

@mattiz
Copy link
Author

mattiz commented Mar 1, 2014

This permissions work for me. The "myuser" and "mygroup" is the user and group that runs the snapchat download script.

drwxr-xr-x 2 myuser mygroup 4096 2014-02-28 02:16 .
drwxrwx--- 7 myuser mygroup 4096 2014-02-28 22:52 ..
-rw-r--r-- 1 myuser mygroup 229043 2014-01-28 00:33 ca_bundle.crt
-rw-r--r-- 1 myuser mygroup 7042 2014-02-28 02:16 snapchat_agent.php
-rw-r--r-- 1 myuser mygroup 1169 2014-01-28 00:33 snapchat_cache.php
-rwxr-xr-x 1 myuser mygroup 26322 2014-01-28 00:33 snapchat.php

@MatthewHallCom
Copy link

Thanks, i've got those exact same permissions and i'm still getting errors, must be a different issue!

@mattiz
Copy link
Author

mattiz commented Mar 17, 2014

The problem reappeared for me also. This time there is no problem with the permission.

nowned: Did you figure out anything more?

@mattiz mattiz reopened this Mar 17, 2014
@dprogramming
Copy link

What error message do you get @mattiz ?

@mattiz
Copy link
Author

mattiz commented Mar 17, 2014

dprogramming:

Fatal error: Call to a member function get() on a non-object in /var/www/hosted/snaps.kopweb.net/www-root/lib/snapchat.php on line 234

@dprogramming
Copy link

Possibly your server IP got blocked? Try your code on localhost...

@mattiz
Copy link
Author

mattiz commented Mar 19, 2014

As far as I can tell, the IP is not blocked, but the account seem to be disabled.

Feature request: Better error messages on failed login

@dprogramming
Copy link

So it works now with a different account?

@trankil12
Copy link

hi i have the same error Fatal error: Call to a member function get() on a non-object in /public_html/snapchat/src/snapchat.php on line 234 but only when i whant to add or delete friend, if i whant to list my friend or display my snaps its working

do you have idea??

$snapchat = new Snapchat($username,$password);
$message = $snapchat->deleteFriend($suppr);
print_r ($message);

@martynball
Copy link

Same issue here!

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

No branches or pull requests

5 participants