I'm having a problem with getting the tutorial to work on the device
it works fine in the simulator, but when I try to run it on the device it doesn't work.
I put some logs and it seems to come from the login function
===JASONROGERS292C 2480 supAdmin s3pAdmin
[0.0] TAC:TAI.handleRegRsp : ALREADY_REGISTERED
[0.0] TAC:TAI.handleRegRsp : (ALREADY_REGISTERED), registered entry found:{{APN=,id=2,state=CLOSED,waf=WAF[0.0] _3GPP,keepAlive=300,IP=0.0.0.0,dnsSrv=0.0.0.0}}
[0.0] [TMM.TunnelAllocator]:runNotReadyListeners: registered listeners found
[0.0] TAC:TAI.handleListenerDeRegRsp: not existent tunnel in TAC, tid=2
[0.0] SIM cache not loaded
has anybody got an idea what I forgot to do when running the code on a device?
Cheers
Jason
edit:
a couple of links towards what I'm doing (I can post all the code people want but its the standard generated code form SUP, which mean a lot of code lol)
The tutorial
http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01214.0200/doc/html/title.html
the zip to the already done tutorial :
http://www.sdn.sap.com/irj/bpx/index?rid=/webcontent/uuid/40ea4956-b95c-2e10-11b3-e68c73b2280e
Solution:
I was missing a couple of things:
1) Specify that the app should use Wifi
SUP101DB.getSynchronizationProfile().setString("transport", "WIFI");
2) Check that the DNS: in my case the server was local to my windows (through parallels) so I had to specify the ip and not the namespace
getSynchronizationProfile().setServerName("10.50.30.108");//"JASONSERVER");
I downloaded the SUP 101 - BlackBerry Project and checked the sources.
It does not contain networking code in the form a usual BB app would do.
However I see the SUP101.SUP101DB class has the following method:
private static String getSyncTransportSuffix() {
com.sybase.persistence.ConnectionProfile syncProfile =
getSynchronizationProfile();
return com.sybase.afx.util.NetworkUtil.getTransportUrlSuffix(syncProfile);
}
So the code uses com.sybase.afx.util.NetworkUtil to get url suffix. By appending such suffix to a url we say to the underlaying BB API what network transport to use. Unfortunatelly sources do not contain com.sybase.afx.util.NetworkUtil to look how exactly it works.
I should say that even with native Java BB development detecting a proper network transport may turn to be a very tricky part. OS 5+ provides a new networking API that is much better, but for the older OS it is hard. This SUP project is built with BlackBerry JRE 4.6.1, so it can not use new OS 5+ networking API. Who knows maybe SUP simply fails to detect proper network transport?
Any way, just a few ideas to try:
check for APN settings on the device, sometimes they have to be populated in order to use Direct TCP transport (it depends on wireless provider requirements). APN name/pass are wireless provider specific. Usually googling allows to find proper APN settings for a provider.
if your device has WiFi try enabling it. SUP should be smart enough to prefer WiFi if available. In this case I assume networking should have no issues.
Related
I Have an Electron app with a Webview. When i set the webview src to the website https://www.zap.co.il
i'm receiving the error: net:ERR_CONNECTION_RESET. The weird things are:
It's happening only for that website, i'm not receiving this error from any other website.
I'm able to reach the website from any other browser on my computer (Chrome, Chromium).
This is happening in both Windows and Mac platforms.
A colleague of mine have the same App installed on her computer, and she is experiencing the same behaviour from a different computer (and network)
There is no antivirus Installed that may intercept and no proxy configured. I have tried to reset the network, clear cache and cookies, change the MTU and basically any solution i found on the internet, and since it's happening for my colleague too, i suppose it has nothing to do with a network issues.
And since i can reach the website from other browsers, I think the issue is probably relates to Electron.
I'm Using the versions:
electron: 8.2.1
electron-builder: 22.4.1
The problem was that electron add's few properties to the user agent string. and this specific website is not accepting custom properties in the user agent (probably for security reasons). I fixed it by removing the additional properties from the webview's user agent:
webview.addEventListener('dom-ready', () => {
const uaArr = webview.getUserAgent().split(" ");
const newUaArr = uaArr.filter((uar => !uar.startsWith('Electron')));
webview.setUserAgent(newUaArr.join(" "));
});
I am using TNetHttpRequest and TNetHTTPClient to send post data to API url like this:
Params := TMultiPartFormData.Create;
Params.AddFile('file_upload', 'c:\myfile.txt','application/octet-stream');
NetHTTPRequest1.Post('https://myurl.com', Params);
This work fin on Windows 10 but on new Windows 7 Home edition I get error
Error Sending data (12175) A security error occurred
I looked at Microsoft error number HERE
ERROR_WINHTTP_SECURE_FAILURE
12175
One or more errors were found in the Secure Sockets Layer (SSL) certificate sent by the server. To determine what type of error was
encountered, check for a WINHTTP_CALLBACK_STATUS_SECURE_FAILURE
notification in a status callback function. For more information, see
WINHTTP_STATUS_CALLBACK.
But I really dont know how to call these callback fundtions or what is causing this error ?
I solved this by unchecked using SSL2 and SSL3 from NetHTTPClient1 and I used only TLS
I had experienced the same error on Windows 7 Pro, reproducible easily by using the Delphi 10.3. Sample "HttpAsyncDownload".
I tested the compiled application on Windows 10 where it runs flawlessly.
Finally, I found following page which solved the issue for me:
https://support.microsoft.com/en-us/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-wi
Briefly, support for Transport Layer Security (TLS) 1.1 and TLS 1.2 is acitvated for Windows 7. I used the "easy fix", which enables this systemwide as well as for Internet explorer.
Finally, the above sample application "HttpAsyncDownload" runs on Windows 7 Pro flawlessly.
This is my first time create an ios application that required deep linking. I need to create a web service for my custom url scheme for ios in order to publish it online. Please give some pointer on regarding which web service i should use or is there an alternative way to create a deep linking for custom url scheme for iOS. Thanks.
You can do it yourself with any server platform - Rails, PHP, Dot.Net, etc.
Here is a very simple PHP snippet. Replace "myappname" with your app's URL scheme. The param/value query is optional - you can use any other text and parse it in your App Delegate's openUrl method.
if (strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone OS') !== FALSE) {
// redirect
header("location: myappname://?key=value");
exit();
}
Client use-cases:
iOS Safari, your app installed - will open your app.
iOS Safari, your app not installed - Safari will complain that it cannot open the link.
Another iOS app, your app installed - will switch to your app.
Another iOS app, your app not installed - same as Safari. However, if the other app is implementing UIApplication's canOpenURL: - it may gracefully take the user to the App Store, but it's up to the other app developer.
Any other device or browser - will continue to render the page, where you can add your html including AppStore links.
If you don't want to create the server code, you can use a tool I created for this purpose. You have it here:
http://www.uppurl.com/
It's mainly a short link tool that checks for user device and give him the right url based on his devices. With this tool you don't need to write any server code and it also takes care of different devices, operating systems and browsers.
Take care of Tal answer as latest versions of Chrome has changed the way to open app and now you need to provide a link in different format, they use something like "intent://..."
We already have Facebook working on our main desktop app without an issue. When I added the same setup code to our mobile site I received an error from the JavaScript SDK:
Received message of type object from https://s-static.ak.facebook.com, expected a string
Then, I changed the setup code to an exact replica from here: https://developers.facebook.com/docs/guides/mobile/web/ and received the exact same message.
This error only shows when the user-agent is iOS or Android in Chrome Developer Tools or in the iOS Simulator. When it's running from the desktop, we aren't seeing this error.
Any idea what's going on here?
Thanks :)
With all due respect, I believe that bokonic's answer is missing the point. The immediate reason of the message you're receiving is most likely javascript postMessage method. It is used to communicate your website with an object returned by window.open or an iframe's embedded website.
window.parent.postMessage(message, targetOrigin);
You might want to have a look at this article to see how it works.
According to MDN reference first argument of the postMessage method can be of any type. Still, Prior to Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3), the message parameter must be a string.
I tested the method on Chrome 28.0.1500.72 (latest version when writing this answer) and it works fine when passing an object but still throws the warning message to the console. I believe that facebook feels uncomfortable with passing some rich data as a string so they pass it as an object and simply doesn't care about the warning. Or, since there is a workaround (e.g. JSON.stringify), they have a bug they don't know about.
I had the same error. This isn't necessarily the reason you're getting it, but I ended up looking at the packets being received by my iphone simulator, and here's the error from s-statick.ak:
[truncated] <span>Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one o
For me, the error is that on my device(s), I'm accessing the site through an ip address (192.168.xx etc) and on local development I have hosts routing localhost to a url that is in my facebook app config... so the IP isn't configured for the app.
Facebook won't let me use an IP address, so it seems like the only option is a test deploy or a DNS server. Hope this helps you out.
I am currently developing a proof of concept Blackberry application that uses RPC calls. I have also developed a very basic server application in .Net that simply timestamps a string sent to it and returns it to the client. I have been able to connect to the server app using a .Net client and a Java client so I am fairly confident it works correctly.
For the Blackberry client application I used Java Wireless Toolkit 2.5.2 to generate stubs for the RPC calls. I then used these calls in a basic Blackberry app to try and replicate the results of the .Net and Java clients, but it keeps throwing exceptions. I am not sure if I am using stubs correctly.
pushScreen(new HelloWorldScreen("Initiating communication"));
try {
IHelloService_Stub stub = new IHelloService_Stub();
String result = stub.hello("Hello From Blackberry");
pushScreen(new HelloWorldScreen(result));
} catch (RemoteException e) {
pushScreen(new HelloWorldScreen(e.getMessage()));
}
At present I am running everything locally. The server runs as localhost and the Blackberry app is running on the Blackberry simulator. I have used the Blackberry browser to check if I can reach the service and I can so its not the network connection that is the issue.
The exception thrown is the following:
java.io.interruptedIOException: Local connection timed out after ~ 120000
Try appending ;deviceside=true to your URL. That should eliminate the need for using the MDS simulator.
It appears that it matters where MDS is installed. I had originally installed in in C:\Program Files(x86)\Research in Motion but then read a post elsewhere that suggested installing it directly to C:\ . Amazingly, that did the trick and MDS now runs. For anyone else having MDS issues, here's a troubleshooting link:
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800792/801079/Support_-_BlackBerry_Mobile_Data_Service_Simulator_does_not_launch.html?nodeid=800979&vernum=0