Getting ReferenceError: "OAuth1" is not defined when migrating from OAuthConfig - google-apps-script

I'm receiving a
ReferenceError: "OAuth1" is not defined.
when trying to migrate my code from OAuthConfig. Is there a library I need to invoke in Resources->Libraries?
The example code I used is the one from Google Developers
Any help would be appreciated.

I managed to find an official-looking OAuth1 implementation here
The project ID to use is in the description:
Mb2Vpd5nfD3Pz-_a-39Q4VfxhMjh3Sh48
Hope it'll help those migrating their applications.

Related

Adding "ant-design-pro": "^2.3.2" and including it in project resulting in error

I'm getting the below error when I try to import "ant-design-pro": "^2.3.2" and use it in my ShadowCLJS project.
The required JS dependency "./factoryWithThrowingShims" is not available, it was required by "node_modules/bizcharts/umd/BizCharts.js".
Confirmed that after removing the dependency and referece of ant-design-pro gets my app up and running properly.
Any help would be highly appreciated.

How to use the ABAP namespace /ABC/ in the custom SAPUI5 application?

I am new to the SAPUi5 things. I am developing a custom Fiori application using using SAP Web IDE. I Manually deploy the application to the system using report /UI5/UI5_REPOSITORY_LOAD.
Initially I used the project name in the Web IDE with name 'ZAPP' and gave the same name while deploying the app to ABAP system. Everything worked fine.
Now, I have a requirement where I need to use the namespace in the project name e.g. '/ABC/APP'. How do I achieve this?
PS: I have tried deploying the ZAPP and replaced all the occurrences of 'ZAPP' with '/ABC/APP', but it gives me a following error:
Uncaught Error: The provided argument '/ABC/APP' may not start with a slash
at toUrl (ui5loader-dbg.js:1994:10)
at r.toUrl (ui5loader-dbg.js:1979:11)
at e._applyManifest (ComponentMetadata-dbg.js:173:13)
at e.getManifestObject (ComponentMetadata-dbg.js:315:5)
at e.init (ComponentMetadata-dbg.js:192:4)
at p._initCompositeSupport (Component-dbg.js:626:4)
at ManagedObject-dbg.js:534:11
at f.constructor (ManagedObject-dbg.js:558:4)
at f.constructor (Component-dbg.js:293:17)
at f.constructor (UIComponent-dbg.js:81:14)
Any help in this regard would be really appreated :-)

Forge viewer Document.load throws exception on mobile devices

We are using Forge viewer version 3.2.x.
For Autodesk.Viewing.Document the function load(documentId,onSuccessCallback,onErrorCallback,accessControlProperties) the parameter accessControlProperties is listed as required (see Autodesk Forge Documentation). Not providing this parameter still works on Chrome / Firefox, but I discovered that missing the parameter causes problems on mobile devices. However, for this parameter there seems to be no example or specification available.
Maybe the problem is not the missing parameter itself but something else...? Getting the following exception in browser console:
Uncaught TypeError: Cannot read property 'id' of null
at PinchRecognizer.recognizeWith (viewer3D.js?v=3.2.*:2300)
at Array.forEach (<anonymous>)
at each (viewer3D.js?v=3.2.*:923)
at invokeArrayArg (viewer3D.js?v=3.2.*:903)
at PinchRecognizer.recognizeWith (viewer3D.js?v=3.2.*:2294)
at new Autodesk.Viewing.GestureHandler (viewer3D.js?v=3.2.*:16042)
at GuiViewer3D.Viewer3D.createControls (viewer3D.js?v=3.2.*:44685)
at GuiViewer3D.Viewer3D.initialize (viewer3D.js?v=3.2.*:44758)
at GuiViewer3D.initialize (viewer3D.js?v=3.2.*:50852)
at GuiViewer3D.Viewer3D.start (viewer3D.js?v=3.2.*:44555)
Using Viewer.loadDocument(documentId,onDocumentLoad,onLoadFailed,accessControlProperties) is not an option, because we must load multiple models into the viewer.
Apologies for the late response, we have a backlog in the queue due to the IFC issue this week.
According to my experience, the accessControlProperties is not a required parameter for using ViewingApplication.loadDocument(). Could you consider providing a reproducible case demonstrating this issue to forge.help#autodesk.com? I'm glad to help you check what happened.
A non-confidential reproducible case contains following items:
A short exact description of what you are trying to achieve.
The behavior you observe versus what you expect, and why this is a problem.
Some complete yet minimal sample models to run a test in. For example, Revit sample models here: https://knowledge.autodesk.com/support/revit-products/getting-started/caas/CloudHelp/cloudhelp/2016/ENU/Revit-GetStarted/files/GUID-61EF2F22-3A1F-4317-B925-1E85F138BE88-htm.html.
A complete yet minimal Forge viewer app that can run and debugged.
Detailed step-by-step instructions for reproducing the issue, e.g. which element to pick, what command to launch etc.
Thanks for your reply, Eason - isolating the issue from our whole application was quite difficult, but made me finally find the problem myself:
We had a conflict with another JavaScript library that is included in our minified js file. The GestureRecognizer classes are named similar as in the camunda library which we are using for modelling bpmn processes. Solved it by excluding that library from the global js and include it only where it is needed, same as how we are dealing with forge library.

What Angular Providers do and how to use it?

I'm new with Angular. I follow a tutorial from this link, and i tried to do/add something that doesn't part of that tutorial. I added a providers :[EmployeeService] line to employee-list.component.ts and empployee.component.ts inside #component, and it returns error that said TypeError: Cannot read property 'push' of undefined. So realize that adding providers :[EmployeeService] to some components are unnecessary. I read about Dependency Injection from this link but i do not really get what i wanted to know. So can anyone give me a simple explanation how/when/where to use/put providers and how that error happens?
Thank you very much in advance.
providers array tells Angular what services it should instantiate. You can define it on two places:
component
module
When you use providers in component the service will be available to that and all it's children.
When you use it in module the service will be available for all pipes, directives, components and services in given module.
But you can define it in both if you want - in that case Angular will create two instances of the same service.
For beginning provide your services on the module level.

WriteMessageText() - example code compile error - error CS0103: The name 'Window' does not exist in the current context

I'm trying to create an application using the NFC (proximity) API on Windows Phone 8. When I copy the example code from the documentation, I get the following compile error...
error CS0103: The name 'Window' does not exist in the current context ...
This error is all over the internet and the common solution seems to be that it only works for native (or C++) code. However the documentation says that it works for managed or native code. How do I get the examples to work in my managed code?
In order to gain access to the active Windows.UI.Core.CoreDispatcher object, you simply need to request Windows.UI.Core.CoreWindow.GetForCurrentThread().Dispatcher.
ORIGINAL EXAMPLE CODE
// Write a message to MessageBlock on the UI thread.
private Windows.UI.Core.CoreDispatcher messageDispatcher =
Window.Current.CoreWindow.Dispatcher;
CORRECTED CODE
// Write a message to MessageBlock on the UI thread.
private Windows.UI.Core.CoreDispatcher dispatcher =
Windows.UI.Core.CoreWindow.GetForCurrentThread().Dispatcher;
The one small change makes all the examples work! Enjoy.