124
Views
9
Comments
[File Transfer Plugin] [File Transfer Plugin] Cannot read property 'activeScope' of undefined
Question
file-transfer-plugin
Mobile icon
Forge component by Hector Gordin

Mobile, Platform 10, Android, SS 10.0.1007.0

Trying to download a PDF using DownloadFile in File Transfer Plugin, but always get "Cannot read property 'activeScope' of undefined" (running on Android device). Using latest versions of File / Common Plugins.

There used to be some example code (https://www.outsystems.com/forge/component-overview/1635/file-transfer-sample) but this appears to have been removed. I read the notes in github about this being deprecated in favour of using an XMLHttpRequest with type 'blob', but this appears to not be allowed within the OS mobile screens (it says the responseType cannot be altered). Are there any examples of either this plugin working or how to use XMLHttpRequest within OS?

Staff

Hi Neil, 

I hope that you are well and you had an amazing Christmas and Happy New Year break. 

Please check our sample here: 

Please let me know if was helpful to solve your issue. If not we will be back to you.

Kind Regards

That's P11, do you have the demo for P10?

Well I tried replicating the download part of the demo (given I can't copy/paste from 11 to 10) but gives the same error. Any idea where this "activeScope" error comes from? The log isn't very helpful...

TypeError: Cannot read property 'activeScope' of undefined
    at Object.exports.scope (HIDDEN/scripts/CommonPlugin.PluginManager.js?p9jQd0DsWRU1NELh87w3Ng:60:35)
    at HIDDEN/scripts/FileTransferPlugin.controller.js?8bQqBA_lBaMNEBFxzcjCFA:267:24
    at Object.execCb (HIDDEN/scripts/OutSystems.js?9wI1QApw0aY4NL+QnzBpng:1:11818)
    at b.check (HIDDEN/scripts/OutSystems.js?9wI1QApw0aY4NL+QnzBpng:1:5974)
    at b.enable (HIDDEN/scripts/OutSystems.js?9wI1QApw0aY4NL+QnzBpng:1:8689)
    at b.init (HIDDEN/scripts/OutSystems.js?9wI1QApw0aY4NL+QnzBpng:1:5197)
    at HIDDEN/scripts/OutSystems.js?9wI1QApw0aY4NL+QnzBpng:1:10315

Staff

Hi Neil, 

Please check our P10 Sample that I have attached to the post.

Thank you,

Kind Regards

FileTransferSample.oap

OK, now I see the problem - I wasn't aware that it needed the DownloadFile component in the interface - my ignorance, but I assumed the DownloadFile client action was all that was required!

Maybe you could spell this out somewhere for people who are not that familiar with the OS Mobile architecture? I've seen quite a few messages about this issue...

the download component?

Hi @Prolacto 0 

This is what Neil was referring to:

There is a similar 'UploadFile' block as well. I have responded to your own post with a screenshot as well. Hope it helps,

Regards,

AJ

Staff

Hi Neil, 

We are glad that our sample has helped. 

Thank you very much for your feedback we will let you know when we will add this information to the documentation.

Kind Regards 


I am glad I found this post because the documentation hasn't been updated at all

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.