Picture of Wim 4127
Registered 7 years 1 day
Wim 4127 Friday, 8 May 2020, 04:08 PM
Failed to upload binary file, See log for details
Hi, while developing an app and working ok the whole day, I suddenly get an error message box in Visual Studio when trying to debug the application. "Failed to upload binary file. See log for details." (screenshot attached)

Which log is this? Is this is a log file, and if yes, where can I find it? I
1>------ Build started: Project: SnomProvisioningApp, Configuration: Debug ARM ------
1>arm-linux-gnueabi-g++.exe -MMD -MF arm-debug/dep/main.dep -I sdk -I . -Wall -Werror -fno-delete-null-pointer-checks -c -D NO_LEGACY -D BUILD=13A256 -g3 -O0 -DDEBUG -Wno-psabi -isystem "C:\innovaphone\sdk/arm-7.2.0-linux-gnu/arm-linux-gnueabi/include/c++/7.2.0" -isystem "C:\innovaphone\sdk/app-platform-libs/8/armel/usr/include" -fsigned-char -o arm-debug/obj/main.o main.cpp
1>arm-linux-gnueabi-g++.exe --sysroot="C:\innovaphone\sdk/app-platform-libs/8/armel" -Wl,-rpath,"C:\innovaphone\sdk/app-platform-libs/8/armel/usr/lib" -Wl,-rpath,"C:\innovaphone\sdk/app-platform-libs/8/armel/lib" -Wl,--warn-common -o arm-debug/SnomProvisioningApp/SnomProvisioningApp arm-debug/obj/appwebsocket_httpdata.o arm-debug/obj/fonts_httpdata.o arm-debug/obj/lib1_httpdata.o arm-debug/obj/ui1.lib_httpdata.o arm-debug/obj/apps_start.o arm-debug/obj/apps.o arm-debug/obj/ConfigInit.o arm-debug/obj/DatabaseInit.o arm-debug/obj/TaskDbInit.o arm-debug/obj/TaskReadUserCount.o arm-debug/obj/TaskReadWriteCount.o arm-debug/obj/SrapsConnector.o arm-debug/obj/SrapsData.o arm-debug/obj/SrapsRestClient.o arm-debug/obj/SnomProvisioningApp.o arm-debug/obj/SnomProvisioningAppService.o arm-debug/obj/SnomProvisioningAppSession.o arm-debug/obj/main.o -lpthread -luuid -lhpdf -lpng -lcap -lpam -lcrypto -lssl -lmysqlclient -ldl -lz -lpq -L sdk/lib/arm-debug -lsdk-132357
1>Remote build command not configured, skipping.
Build has been canceled.

The app builds normal and without any errors. I cannot see any reason or log file where a reason could be found. Please advise.

Kind regard,

Wim


copyerror.png

Picture of Wim 4127
Registered 7 years 1 day
Wim 4127 Sunday, 10 May 2020, 04:38 PM
Re: Failed to upload binary file, See log for details
Hi,

please contact me urgently regarding this issue. Currently, I cannot develop/run any app anymore on the platform. It used to happen once in a while, but, in the meantime it comes all the time, and I can no longer run.

I tried rebooting my machine, not solved
I tried rebooting the app platform, not solved
I tried rebooting te pbx and app platform, not solved
I create a new app in visual studio from the innovaphone template, and didn't change anything, and still get the same error.
I can't seem to find any log that points in this direction
Command output window shows no other window than mentioned here above. The app platform and pbx are running however perfectly fine, so no idea what is going on here. PBX is reacable, also via Putty on port 22 without any problem.

Help is really needed, this is complete blocker

Wim
Picture of Marc Schodermayr (innovaphone)
Moderator Registered 9 years 315 days
Marc Schodermayr (innovaphone) Monday, 11 May 2020, 10:53 AM
Re: Failed to upload binary file, See log for details
Hi Wim, the log will be written to the Visual Studio output pane. There you can switch to innovaphone SDK. In that pane, wach log data will be written by the extension. Please try again and post the log here, so that we can look what's going wrong. Waiting for your reply. Atc. Marc
Picture of Wim 4127
Registered 7 years 1 day
Wim 4127 Monday, 11 May 2020, 11:21 AM
Re: Failed to upload binary file, See log for details
Hi, the output is as follows. This I find strange because:
- I can connect to the PBX, the app platform and everything with http and https and I can connect to the app platform with Putty/SSH without any problem.
- It used to work before, and, it started "gradually", sometimes it worked, sometimes it didn't, and got worse up until the point where now it never works. "access right" are not sometimes on or off, so I'm not sure what is blocking this.
- If I used the VS plugin from innovaphone and use the test connection and/or the init app platform and pbx commands... they all say everything is ok.

Please advise on how to continue. if needed, I can give you anydesk access to my machine and we can plan a call then.

[05-11 11:14:11.099] innovaphone SDK Visual Studio Package v1.0
[05-11 11:14:11.099] copyright (c) 2018 innovaphone AG
[05-11 11:14:11.099] Initializing...
[05-11 11:14:11.264] innovaphone SDK extension initialized successfully.
[05-11 11:14:11.312] Scanning solution for AppPlatform projects...
[05-11 11:14:11.312] Project: InnovaphoneTemplateApp => done
[05-11 11:14:11.343] 1 innovaphone AppPlatform projects found
[05-11 11:14:11.349] Checking projects for the need of install / update innovaphone SDK...
[05-11 11:14:11.349] Checking project InnovaphoneTemplateApp => SDK is up to date.
[05-11 11:14:11.371] Checking for SDK updates
[05-11 11:14:12.377] Checking for SDK updates done - your innovaphone SDK installation is up-to-date.
[05-11 11:14:42.157] *** DEBUG: UploadAppBinaryAsync() - Uploading...
[05-11 11:14:43.030] *** DEBUG: UploadAppBinaryAsync() - EXCEPTION!!!!!!!!
[05-11 11:14:43.032] Unable to read data from the transport connection: The connection was closed.

Picture of Marc Schodermayr (innovaphone)
Moderator Registered 9 years 315 days
Marc Schodermayr (innovaphone) Monday, 11 May 2020, 12:27 PM
Re: Failed to upload binary file, See log for details
Well, that's strange. Especially that wired message at the end. After the second *** DEBUG: output, an another message sould apear, too.

So, let's try to find out, what's going wrong. At first, can you please activate some logs for the webserver and the AP manager? To do so, open the AP Manager (by entering the IP address into the browsers address field or opening the myApps page for your test environment and start "Apps" there).

Then select the webserver on the left side, click in the toolbar on "Diagnostics" and activate "Websocket Client", "Webserver Traffic" and "Webserver". Click "Save" to close the dialog and also delete the currently existing log file by clicking on "Delete" (on of the links beside the big webserver icon).

Then select the Manager from the list on the left side, again click on "Diagnostics" and here enable "App" and "Webserver traffic". Again save it and delete the currently existing log file.

Now try to start the debugging session again from your Visual Studio and if it fails again, please send me the log files of the webserver and manager, too. You get them by clicking on "Display" beside the icon of the Webserver and Manager.

BTW., can you also tell me which Visual Studio version you have, please?
Picture of Wim 4127
Registered 7 years 1 day
Wim 4127 Monday, 11 May 2020, 03:12 PM
Re: Failed to upload binary file, See log for details
It's going from bad to worse I'm afraid. I enabled the logging as you indicated in the above reply. When I click the "display" logging of the AP Manager now it opens a new tab which results in an HTTP error 503. Same happens for the web server by the way. Also, when I do this, a few seconds later, the AP manager app refreshes (goes blank and then reappears) and then I see the Files app restarting... see attached screenshot.

Could we set up a call sometime today and share my screen with anydesk? Or I can also give you direct access to the PBX if you want. please mail to wim at xqting.be and I will provide any details, or, we can arrange a conf call.

I use Visual Studio 2019, though behaviour is similar in 2017. And as mentioned before, this worked OK when I started... it seems like something that came gradually...

FailingFilesApp.png

Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 235 days
Daniel Deterding (innovaphone) Monday, 11 May 2020, 04:04 PM
Re: Failed to upload binary file, See log for details
Hi Wim,

I took a look on your AP with the account which you gave Carmen in another case.
I see that the manager constantly crashes, also when trying to download logfiles, coredumps, whatever ...

I assume that this also happens when you try to debug your app.

What we now need is the content of two folders on your AP to be able to investigate why the manager constantly crashes.

Please login with SSH as admin/ipapps (or your super secret admin password from the install) and issue "su root" afterwards (with iplinux as password or your super secret ...).

Issue the following command to create a compressed tar archive of the needed files:
tar cvfh - . -C /var/log | gzip > /home/admin/log.tar.gz

Please download this file with WinSCP and attach it here.

If this is just a development machine, you may try to reinstall it from scratch after having downloaded the log files, as we never saw a similar issue and maybe something is broken inside the linux ...

Greetings,
Daniel
Picture of Wim 4127
Registered 7 years 1 day
Wim 4127 Monday, 11 May 2020, 04:47 PM
Re: Failed to upload binary file, See log for details
Please find the logfiles here: https://www.dropbox.com/s/vslxwc8hju4pin2/log.tar.gz?dl=0

There seems to be many crashes indeed. I could not attach it to the post, it doesn't allow uploading such a large archive :-S

The PBX was reinstalled only just four weeks ago, a clean install with lates v13 software before I started development, so I would rather not reinstall it again.

Anyway, I hope you find something in the logs that might have caused it... maybe some test code of me that did not get removed or overwritten? I will lave the account of Carmen active for the time being , maybe you can still use it.
Picture of Marc Schodermayr (innovaphone)
Moderator Registered 9 years 315 days
Marc Schodermayr (innovaphone) Monday, 11 May 2020, 05:16 PM
Re: Failed to upload binary file, See log for details
Thank you very much for the files. We're going to invest the problem and will keep you updated.
Picture of Marc Schodermayr (innovaphone)
Moderator Registered 9 years 315 days
Marc Schodermayr (innovaphone) Monday, 11 May 2020, 06:34 PM in response to Wim 4127
Re: Failed to upload binary file, See log for details
Ok, we found at least one problem that could have lead to the crashes. We're fixing it and will provide a test-build tomorrow for your system. Until than, have a nice (rest) day. smile
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 235 days
Daniel Deterding (innovaphone) Tuesday, 12 May 2020, 07:58 AM in response to Wim 4127
Re: Failed to upload binary file, See log for details
Hi Wim,

I updated your manager and webserver to a 13r1 SR13 preview build with some fixes.
I also enabled the correct trace flags on both apps and the trace download works now as expected.

Can you retry to deploy your app and then just write a short message here? Then we'll take a look at the traces.

Greetings,
Daniel
Picture of Wim 4127
Registered 7 years 1 day
Wim 4127 Tuesday, 12 May 2020, 08:39 AM
Re: Failed to upload binary file, See log for details
I've made an attempt from a template start project and still get the error...
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 235 days
Daniel Deterding (innovaphone) Tuesday, 12 May 2020, 08:46 AM
Re: Failed to upload binary file, See log for details
Hmm, can you retry again? I needed to adjust something.
Picture of Wim 4127
Registered 7 years 1 day
Wim 4127 Tuesday, 12 May 2020, 08:50 AM
Re: Failed to upload binary file, See log for details
Ok, I did the following:
- I did two build an debugs with the template starter project that comes in Visual Studio. Upload and debugging seems to be working
- I did one build of my other app that I first got the problem with, but, this still gave an error like before.
No clue now why it worked for the one and not for the other

Wim
Picture of Wim 4127
Registered 7 years 1 day
Wim 4127 Tuesday, 12 May 2020, 09:31 AM
Re: Failed to upload binary file, See log for details
I tried some other things as well, but, now, it again seems that it doesn't work for both the projects sad
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 235 days
Daniel Deterding (innovaphone) Tuesday, 12 May 2020, 12:39 PM
Re: Failed to upload binary file, See log for details
I'm now able to reproduce the issue by simply uploading an app manually inside your AP Manager (without any Visual Studio interaction).
I can't reproduce it on my local gateway though.

But like this, wen can investigate the issue by using local debug versions of the manager and webserver on your AP.

So keep it online a while and don't be surprised if the AP Manager is sometimes offline after an update ;)

Greetings,
Daniel
2013
Moderator Registered 16 years 128 days
Guntram Diehl (innovaphone) Monday, 11 May 2020, 02:25 PM in response to Wim 4127
Re: Failed to upload binary file, See log for details
To avoid beeing blocked by this problem, you could upload the App manual from the App Manager (enable developer mode for this).
This way you can at least debug the App by using the logging outputs.
2013
Moderator Registered 16 years 128 days
Guntram Diehl (innovaphone) Wednesday, 13 May 2020, 03:29 PM in response to Wim 4127
Re: Failed to upload binary file, See log for details
Now that we have anlyzed that this issue was caused by a firewall blocking the binary upload, we would like to investigate the cause of this blocking.
I looked at all the traffic, which happens when we do an upload to the AP Mananger to check if there is anything, which might look suspicous for a Firewall.

It is fairly simple, what we do: There are websocket messages, which are used to exchange the parameters of the upload like the path and the authentication key. The upload itself is a normal HTTP POST request, with some URL arguments and as content the binary file. Nothing unusal.

Can you tell us, what firewall product and software version is used?

Is there any more information provided by the firewall, what information is classified as suspicious. Would be good to know if the content of the binary file is the problem, or if traffic patterns are classified as an attack.
Picture of Wim 4127
Registered 7 years 1 day
Wim 4127 Wednesday, 13 May 2020, 03:45 PM
Re: Failed to upload binary file, See log for details
Attached picture is the screenshot of the firewall dropping the upload from the myApps on my PC (ip 10.0.99.231) to the app platform (10.0.0.241).

The CVE error code doesn't really tell me much to be honest sad

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0653

I'm no expert in firewalls, but, if you have one guy who would like to investigate, we can organize a remote session and then you can investigate via my pc such a request if we enable security again...

Firewall is a Barracuda Cloudgen firewall F18 v8
firewall.png

2013
Moderator Registered 16 years 128 days
Guntram Diehl (innovaphone) Wednesday, 13 May 2020, 03:55 PM
Re: Failed to upload binary file, See log for details
The screenshot does not help a lot. I see the keyword "Cross-Site-Scripting", but I have no idea, what could cause this.
Doing a remote session to your PC would not help either. We could wireshark the traffic and see how the firewall blocks the traffic, but this would not provide any information why the firewall is doing this.
So we need some internal diagnostics output what the firewall is doing and what makes it to block the traffic.
Can you contact the manufacturer of the firewall? From the information I have, this looks clearly like a bug in the firewall.
Also model and version of the firewall would be interessting, so that we could warn others.
2013
Moderator Registered 16 years 128 days
Guntram Diehl (innovaphone) Friday, 15 May 2020, 08:48 AM in response to Wim 4127
Re: Failed to upload binary file, See log for details
If we do not receive more information, I will close this discussion tonight.
Picture of Wim 4127
Registered 7 years 1 day
Wim 4127 Friday, 15 May 2020, 09:41 AM
Re: Failed to upload binary file, See log for details
Guntram,

firewall information (type and software is mentioned above). Seems the IT supplier (and manager of the firewall) is not really invested in doing further research for this problem unfortunately sad I was hoping to get more details so we can get to the bottom of this, but, I'm only the middle man here, cannot force them to act, so I can't decide whether this is a bug in the firewall or on innovaphone side...

I understand you want to close the item and probably best to do so if they do not cooperate (and no longer waste time ont his). We changed settings so that it is safer from external but still possible from internal.

Also, I tested, and with HTTPS (as expected), you do not get this kind of errors... maybe it would be possible to foresee an option to upload the binary in visual studio via https instead of http post? Just as suggestion.

One question: in the course of this thread there were some things fixed by Daniel and/or Marc I think, and, they have put a pre-release of the ap manager on our app platform. Do you have any idea when this would become generally avialable?

Regards,

Wim
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 235 days
Daniel Deterding (innovaphone) Friday, 15 May 2020, 09:47 AM
Re: Failed to upload binary file, See log for details
Hi Wim,

regarding the availability: the fixes will be released with SR13. Hopefully at the beginning of next week, but we'll see.

Greetings,
Daniel
← You can define your color theme preference here