debsahu / TwitterWebAPI

An Arduino library to talk to Twitter using Twitter Web API made for ESP8266
GNU General Public License v3.0
29 stars 8 forks source link

Failed to Parse Json and Hostname Webpage Not Working #3

Closed JSwaim22 closed 5 years ago

JSwaim22 commented 5 years ago

When I run the TwitterTweetSearch example, it says error failed to parse Json and messages never come in. I am using version 5 of the ArduinoJson library as the code does not compile using version 6. Is this part of the problem?

Also, I was also wondering what the Hostname is supposed to be. Whenever I try to go the Hostname's webpage it doesn't work yet the IP address webpage does work.

I have included what my serial terminal says below.

...........Connected. yay! IP address: 192.168.0.15 NTP Synced mDNS responder started. Goto http://TwitterTweet.local/ on web-browser if you are on the same network! or goto http://192.168.0.15 HTTP server started Failed to parse JSON! Error Search: #dog MSG: No Message Yet!

Squatnet commented 5 years ago

I have this issue also using master branch

debsahu commented 5 years ago

What is the output of replacing https://github.com/debsahu/TwitterWebAPI/blob/cb45a1745c87c6705744663bd541fe4267d607c3/examples/esp8266/TwitterTweetSearch/TwitterTweetSearch.ino#L249 with

Serial.print("Result: ");
Serial.println(tcr.searchTwitter(search_str));

** note I still don't have my setup to test this yet

debsahu commented 5 years ago

try the master branch now? Someone from youtube was able to point me to the changes in which SSL requests are handled by esp8266 since 2.5.x core. BearSSL can do certificate checks for each SSL request needing huge amounts to RAM temporarily, so a insecure request should suffice for our purposes here. I added for every request we make:

client.setInsecure();
JSwaim22 commented 5 years ago

Here is what I got from replacing the extractJSON line with the two Serial.print lines still using your old master branch

..............Connected. yay! IP address: 192.168.0.182 NTP Synced mDNS responder started. Goto http://TwitterTweet.local/ on web-browser if you are on the same network! or goto http://192.168.0.182 HTTP server started Result: Error Search: #dog MSG: No Message Yet! Result: Error Search: #dog MSG: No Message Yet!

JSwaim22 commented 5 years ago

Works great now! Sometimes it would restart as shown below but I believe that was just when I was trying to Tweet from http://192.168.0.182 while the code was trying to search for new tweets. Thanks for fixing the problem!

...............Connected. yay! IP address: 192.168.0.182 NTP Synced mDNS responder started. Goto http://TwitterTweet.local/ on web-browser if you are on the same network! or goto http://192.168.0.182 HTTP server started Search: #dog MSG: No Message Yet! Search: #dog MSG: @boccajuann says ud83dudc3eu2764ufe0fud83dudc3e GIVE THEM TRUST TO EARN THEIR TRUST ud83dudc3eu2764ufe0fud83dudc3e

americanbully #bully #puppy #dog #theabkc #bullybreedu2026 https://t.co/0oLQXlQBmQ

Search: #dog MSG: @boccajuann says ud83dudc3eu2764ufe0fud83dudc3e GIVE THEM TRUST TO EARN THEIR TRUST ud83dudc3eu2764ufe0fud83dudc3e

americanbully #bully #puppy #dog #theabkc #bullybreedu2026 https://t.co/0oLQXlQBmQ

Search: #dog MSG: @JennT_W says RT @SaganDood: What? Sometimes a fella just wants to sit in a basket. Thatu2019s all. #dogsoftwitter #dog https://t.co/v6G2Sj9Atg Search: #dog MSG: @JennT_W says RT @SaganDood: What? Sometimes a fella just wants to sit in a basket. Thatu2019s all. #dogsoftwitter #dog https://t.co/v6G2Sj9Atg

Exception (3): epc1=0x402129c5 epc2=0x00000000 epc3=0x00000000 excvaddr=0x4003bff8 depc=0x00000000

stack>>>

ctx: cont sp: 3ffffda0 end: 3fffffc0 offset: 01a0 3fffff40: 3ffef618 00001845 00001845 40212ab4
3fffff50: 3ffef430 3ffef438 3fffff90 40212edc
3fffff60: 00000000 ff28439b 401001f6 402105ac
3fffff70: 00000000 00000000 3ffef558 402105d0
3fffff80: 3ffef430 3ffef438 3ffef558 40204b26
3fffff90: 3fffbd64 0110011f ff000001 3fff01a0
3fffffa0: 3fffdad0 00000000 3ffef558 40211678
3fffffb0: feefeffe feefeffe 3ffe856c 40100585
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d v8b899c12 ~ld

Connecting to WiFi Network...........Connected. yay! IP address: 192.168.0.182 NTP Synced mDNS responder started. Goto http://TwitterTweet.local/ on web-browser if you are on the same network! or goto http://192.168.0.182 HTTP server started