Failed to load launch URL with error: Domain Error = TVMLKitErrorDomain Code = 3 "(null)"

Description:

I created a new TVML project and started it. The first error was application transport security, which I installed with Info.plist:

App Transport Security Settings -> Allow Arbitrary Loads -> YES

Then I ran it again and I get this error:

Failed to load start URL with error: (null) appController (_: didFailWithError :) is called with error: Error Domain = TVMLKitErrorDomain Code = 3 "(null)"

The project seems to stop here ( application funcin AppDelegate.swift):

   appControllerContext.launchOptions["BASEURL"] = AppDelegate.tvBaseURL
   print(launchOptions) //returns nil
   //error on following line
   if let launchOptions = launchOptions as? [String: AnyObject] {
        //does not enter here
        for (kind, value) in launchOptions {
            appControllerContext.launchOptions[kind] = value
        }
    }

What I tried:

I tried changing tvBaseURL to " http: // localhost: 9001 / " withhttp://MY-IP-ADDRESS-HERE:9001/

but that didn’t change anything.

Question:

What causes this error and how to solve it?

+4
3

ruby -run -ehttpd . -p9001

, , tvBaseURL ,

"http://yourLocalhost:9001/Downloads/TVMLCatalogUsingTVMLTemplates/Server/"
+2

, , tvBaseURL AppDelegate

static let tvBaseURL = "http://127.0.0.1:9001/Downloads/TVMLCatalogUsingTVMLTemplates/Server/"

- . , - -.

, !

+1

. .

:

[2019-03-15 12:28:43] INFO  WEBrick 1.3.1
[2019-03-15 12:28:43] INFO  ruby 2.3.7 (2018-03-28) [universal.x86_64-darwin17]
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/socket.rb:205:
in 'bind': Address already in use - bind(2) for 0.0.0.0:9001 (Errno::EADDRINUSE)

- bind (2) 0.0.0.0:9001

( , , XCode ), , ctrl + c .

, Apple ruby -run -ehttpd. -p9001 ruby -run -ehttpd. -p9001 Server, . README, .

+1

Source: https://habr.com/ru/post/1651764/


All Articles