Closed vladkotu closed 5 years ago
looks like it is reproducible only in my local env
(shadow-cljs
uses very latest version of org.clojure/google-closure-library
)
hence closing this issue
Hi, @vladkotu — I think I'm having the same problem, using shadow-cljs. Thanks for determining what is causing it. How were you able to resolve the problem? Many thanks!!!
Here is the exact error from a browser REPL:
=> (cljs-http/jsonp "https://publish.twitter.com/oembed?url=https://twitter.com/realgenekim/status/1223341376475222020&omit_script=true")
TypeError: this.uri_.cloneWithParams is not a function
at goog.net.Jsonp.send (/js/iphone-compiled/cljs-runtime/goog.net.jsonp.js:65:23)
at Object.cljs_http$core$jsonp [as jsonp] (/js/iphone-compiled/cljs-runtime/cljs_http.core.js:326:23)
at cljs_http$core$request (/js/iphone-compiled/cljs-runtime/cljs_http.core.js:455:23)
at eval (/js/iphone-compiled/cljs-runtime/cljs_http.client.js:219:103)
at eval (/js/iphone-compiled/cljs-runtime/cljs_http.client.js:392:103)
at eval (/js/iphone-compiled/cljs-runtime/cljs_http.client.js:485:103)
at eval (/js/iphone-compiled/cljs-runtime/cljs_http.client.js:118:103)
at eval (/js/iphone-compiled/cljs-runtime/cljs_http.client.js:129:182)
at eval (/js/iphone-compiled/cljs-runtime/cljs_http.client.js:310:103)
at eval (/js/iphone-compiled/cljs-runtime/cljs_http.client.js:328:182)
Hi @realgenekim All i needed was to call jsonp endpoint once a while. No other network interactions... so i just wrote custom jsonp function for myself. Setting google closure lib version explicitly in your project should help, however i'm not sure shadow-cljs will handle such downgrade smoothly. Anyway I would better post an issue in shadow-cljs project
Attempt to get data using
cljs-http.client/jsonp
throws an exception:Seems like it caused by these changes In short -
goog.net.Jsonp
expect uri to begoog.html.TrustedResourceUrl
(string of goog.Uri were valid before)Potentially could be fixed by changing how url is build from request here, something like this: