WKWebView delegate method error message - wkwebview

I am using WKWebView to load and display the content of a web site. After the app was launched and running, the delegate method -webView:didFailNavigation:withError:got called. Following is the error description (error.description) extracted from this delegate method using Xcode debugger:
Error Domain=NSURLErrorDomain Code=-999 "(null)" UserInfo={NSErrorFailingURLStringKey=, NSErrorFailingURLKey=, _WKRecoveryAttempterErrorKey=}
I did some Google search and found that Code=-999 is caused by ErrorCancelled, meaning another request is made before the previous request is completed. So how should I fix this issue in my app? Thanks a lot in advance.

Related

MS Teams | Microsoft bot framework - Returns 502 error on task/fetch

I have an MS Teams adapter written using the botframeworks sdk v4 for node js which works perfectly for normal conversations. But when I try to do a task/fetch, it returns an error message "Unable to reach app. Please try again." on the task module popup
I can see from the inspector that it returns 502 response for the request to invoke the task module
The task module returns a simple adaptive card and I can see that I get a callback on my handleTeamsTaskModuleFetch function from the logs
The adapter runs on a docker container with an nginx proxy and the nginx logs shows that, it returns a 200 response whenever I click on the task module launch button
I have a similar setup in my dev and taskmodule works perfect there
Any help is highly appreciated
Update
I have tried hardcoding the adaptive card. That doesnt help either
Eventually it was found that there was a problem with one of the csp headers and microsoft was not happy about it.
I removed the CSP headers and the taskmodule started working
Thanks to #gousia-msft for your help in debugging the issue

Chrome extension background script "Cannot access contens of URL devtools..." error?

I have a background script called events.js
I am occassionally getting this error
Unchecked runtime.lastError: Cannot access contents of url
"devtools://devtools/bundled/devtools_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/#ed9d447d30203dc5069e540f05079e493fc1c132/&dockSide=undocked".
Extension manifest must request permission to access this host.
It is apparently being generated not by events.js but by "_generated_background_page.html" but appearing in my background console log.
I suspect it is being caused by my call in events.js to:
chrome.webNavigation.onHistoryStateUpdated.addListener(function(e) {
// do stuff
}
It is driving me nuts. Can anyone please tell me what is going on?
Similar issue happened to me today. One of those facepalm moments. I discovered as i had a breakpoint in my background script to check something before the content-script was executed in the handle message, that this background devtools tab became the active tab and tired to inject the script and not the intended tab from which I activated my extension.
Hence the error.
Cannot access contents of url
"devtools://devtools/bundled/devtools_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/#7345a6d1bfcaff81162a957e9b7d52649fe2ac38/&dockSide=undocked".

Debugging Groovy in Jira Scriptrunner inline editor

I'm a programmer who is just getting started working with groovy in Jira in order to automate some tasks.
I'm trying to write a custom listener script using the inline editor in Jira, but haven't gotten past trying to get a Hello World program to work.
I don't know if the script is running, and can't see any output, and I really need some help with figuring out how to debug the script, preferably through outputs to some kind of console (or even just by reading the Jira logs if necessary), just so that I can actually start trying to learn how to use this tool.
I'm working with the information HERE as a general guideline to start learning to work with the inline editor.
For a little more context, you can see another related question that I asked HERE.
I've set the debug level to DEBUG for the event which I'm attaching the listener, as shown in this screenshot, based on the information found HERE:
Here is a screenshot of the inline editor I'm working in in JIRA. In this screenshot, I'm just trying to output 'Hello', and have just clicked the 'Preview' button:
As you can see, in the 'Result' tab at the bottom of the screen, there is nothing of interest. The 'Logs' tab is also empty, and the 'Timing' tab just says 'Elapsed: 0 ms CPU time: 0 ms', so it seems like nothing if happening.
If I check the log on the server (in the file catalina.2017-10-13.txt), I see the following output:
13-Oct-2017 07:01:50.942 WARNING [http-nio-8080-exec-6] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI http://somevmserver:8080/rest/scriptrunner-jira/latest/listeners/com.onresolve.scriptrunner.canned.jira.workflow.listeners.CustomListener/params, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using #FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
13-Oct-2017 07:02:26.740 WARNING [http-nio-8080-exec-12] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI http://somevmserver:8080/rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.common.StaticCompilationChecker, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using #FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
13-Oct-2017 07:02:26.974 WARNING [http-nio-8080-exec-1] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI http://somevmserver:8080/rest/scriptrunner-jira/latest/listeners/com.onresolve.scriptrunner.canned.jira.workflow.listeners.CustomListener/preview, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using #FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
This output doesn't mean a whole lot to me, but it seems apparent that it's being populated as a result of trying to preview the script.
I'm not getting any errors in the inline editor, and it's really simple code, so I don't think it's that.
The only other information I can include that I think is pertinent is that this is a test instance of Jira cloned from our production environment, and its base URL is still set to the URL of the prod environment. Not sure if that has any bearing, but I'm not really a Jira admin, just the programmer tasked with doing this, so I don't want to go fiddling around where I don't need to.
Thanks!
When using scriptrunner within jira, you'll need to import the logger to use the debugger or to output to the console. This can be done with the following:
// Enable debugger
import org.apache.log4j.Logger
import org.apache.log4j.Level
def log = Logger.getLogger("com.acme.CreateSubtask")
log.setLevel(Level.DEBUG)
And then, you'll be able to see the logged information using log.debug "hello"
To see your debug message "Hello" in the log, you must update a issue in your selected project. The Result, Logs and Timing Tabs at the bottom are useless in this view. Just trigger the Listener with a issue update in your selected project and search your debug message in the atlassian-jira.log file.
Hint: To view the Log in the browser you can use this jira app https://marketplace.atlassian.com/plugins/com.cps.lastLog/server/overview

Getting error "SecurityError (DOM Exception 18): The operation is insecure" when storing data in localStorage of UIWebView

I am developing one sample Xamarin.Forms Application and in this application I'm using WebView for tyro payment gateway integration and also create WebViewRenderer for store data in localStorage of UIWebView. and I'm getting security error (SecurityError (DOM Exception 18): The operation is insecure).
Tyro payment gateway web url is "https://iclient.test.tyro.com".
Please have a look below my code and help me
string subkey = "window.localStorage.setItem('webTta.integrationKey','integrationKey')";
string key ="try { "+subkey +"; } catch (e) { alert(e); }";
IntegrationKey = _uiWebView.EvaluateJavascript(key);
My issue is solved. This error was occurring by storing data before loading page. I solved this issue by call EvaluateJavascript method after loading a page.
If you try to call an EvaluateJavascript method in blank WebView then it is also occurring.

TYPO3 Scheduler: The page is not configured! [type= 0][]

I have a problem with my scheduler in TYPO3 4.5.5. Every time a task is executed it fails with the following error message:
[scheduler]: Task failed to execute successfully. Class: tx_jobportal_apply, UID: 5. The page is not configured! [type= 0][]
There are 3 domains in my page tree, each having an own root template. The TypoScript Object Browser shows a setup with page.typeNum = 0
I don't know how I can comment on this, so I'll post it as an answer..
I'm guessing you are initiating the TSFE in the scheduler task. Did you specify a page-id, and if so, have you checked this page is under a specific root-page with a typoscript template that has a 'PAGE' configured?
It looks like Your extension jobportal sends an error, check manually the action You are trying to do with scheduler.
The problem is solved.
I made a file reference in the root template in which the PAGE object was configured, like this
<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/typoscript/template-setup_main.ts">
After configuring the object directly in the setup of the template no more error messages appeared and now I am a lucky guy ;)
#Koopa: Thanks for the hint!

Resources