The Movie Database Support

E/flutter ( 4456): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: SocketException: Failed host lookup: 'api.themoviedb.org' (OS Error: No address associated with hostname, errno = 7)

5 replies (on page 1 of 1)

Jump to last post

Hi @svaykong,

Do you know what version of TLS you are connecting to TMDb with? We recently made TLS 1.1 the minimum and I'm wondering if that's what could be the issue.

I am getting an error now as well, same time framee

            //create the connection
            string address = TheMovieDBConn.TMDBAddress + "movie/" + inIMDB + "?api_key=" + TheMovieDBConn.THMDAPIKEY + "&append_to_response=credits,releases,trailers";
            try
            {
                var request = System.Net.WebRequest.Create(address) as System.Net.HttpWebRequest;
                request.KeepAlive = true;
                request.Method = "GET";
                request.Accept = "application/json";
                request.ContentLength = 0;
                string responseContent = null;

                using (var response = request.GetResponse() as System.Net.HttpWebResponse)    <------------------------ throwing exception below
                {
                    using (var reader = new System.IO.StreamReader(response.GetResponseStream()))
                    {
                        responseContent = reader.ReadToEnd();
                        TheMovieDBMovie movieSearchjson = JsonConvert.DeserializeObject<TheMovieDBMovie>(responseContent);
                        movieSearch = movieSearchjson;
                    }
                }
            }

If I go back to http instead of https I am ok, with HTTPS the getresponse is throwing an error that:

InnerException  {"Authentication failed because the remote party has closed the transport stream."} System.Exception {System.IO.IOException}

Thanks Mr. Travis Bell. Now my code is display normally.

If the fault is due to the TLS protocol, how can I correct it in the Dart language? I am new to this and I am learning to program with Flutter and Dart; I am precisely following a tutorial to consume resources from your page (themoviedb.org), and I get the same error as fellow Svykong. I thank you in advance for your help because I have not been able to make the program work.

Hi @adelosrc Unfortunately I do not have any Dart experience so I am not able to provide any assistance. I would suggest asking over on somewhere like Stack Overflow. They are usually much better about answering questions about specific programming languages and implementations.

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login