The main File menu for my app has a Share menu, with standard sharing services requested normally through [NSSharingServices sharingServicesForItems:#[self.fileURL]]. It is never called when fileURL is null.
However, this requests outputs the following error:
Could not instantiate class NSURL. Error: Error Domain=NSCocoaErrorDomain Code=4864
"value for key 'root' was of unexpected class 'NSNull'. Allowed classes are '{( NSURL )}'."
The only value contained in the array is self.fileURL, which is of class NSURL. The sharing menu itself works with no problem, and the only problem is this strange error in the console. What am I doing wrong and where might this null value come from?
Related
I'm new in Shopify, I'm having a problem when I try to use the #shopify/shopify-api.
I'm importing this property from the API.
import Shopify from '#shopify/shopify-api'
When I do the import I get the next error.
Uncaught TypeError: util.inherits is not a function
at node_modules/jsonwebtoken/node_modules/jws/lib/data-stream.js (data-stream.js:39:6)
at __require (chunk-IGMYUX52.js?v=cd28f3b3:40:50)
at node_modules/jsonwebtoken/node_modules/jws/lib/sign-stream.js (sign-stream.js:3:18)
at __require (chunk-IGMYUX52.js?v=cd28f3b3:40:50)
at node_modules/jsonwebtoken/node_modules/jws/index.js (index.js:2:18)
at __require (chunk-IGMYUX52.js?v=cd28f3b3:40:50)
at node_modules/jsonwebtoken/decode.js (decode.js:1:11)
at __require (chunk-IGMYUX52.js?v=cd28f3b3:40:50)
at node_modules/jsonwebtoken/index.js (index.js:2:11)
at __require (chunk-IGMYUX52.js?v=cd28f3b3:40:50)
So I went to the line in the file where is happening the error:
node_modules/jsonwebtoken/node_modules/jws/lib/data-stream.js
And I discovered that error is a property in a node package
if you can't see the image here the code line.
util.inherits(DataStream, Stream);
So I went to the node documentation and I found that method is discouraged, but is not deprecated, therefore it should be working.
here is the description of the method if you can't see the image.
Usage of util.inherits() is discouraged. Please use the ES6 class and extends keywords to get language level inheritance support. Also
note that the two styles are semantically incompatible.
Inherit the prototype methods from one constructor into another. The prototype of constructor will be set to a new object created from
superConstructor.
This mainly adds some input validation on top of Object.setPrototypeOf(constructor.prototype, superConstructor.prototype). As an additional convenience,
superConstructor will be accessible through the constructor.super_
property.
The package in question is named jws, I'm not so sure the purpose of this package, I had the idea to modify the file and use prototypical inheritance replacing that code line but I don't know how good an idea it is do that. furthermore I would have to do that for each file that has that problem, i haven't found any information about this on the intenet.
I'm trying to get the distriqt Adverts extension to work in my AIR app.
On every device that I try my app on, I get that Adverts.service.interstitials.isSupported returns false.
On one device, I also get these Java errors, which is probably the reason why:
Error #2044: Unhandled error:. text=Attempt to invoke virtual method 'java.lang.String com.adobe.fre.FREObject.getAsString()' on a null object reference
Error #2044: Unhandled error:. text=Attempt to invoke interface method 'boolean com.distriqt.extension.adverts.platforms.AdvertPlatform.isInterstitialsSupported()' on a null object reference
I checked and double checked that all required extension are listed in the <extensions> section in the application descriptor xml, and that they are actually included in the APK.
Here is an excerpt of the AS code:
if (Adverts.isSupported)
{
var r:int = GoogleApiAvailability.instance.isGooglePlayServicesAvailable();
if (r == ConnectionResult.SUCCESS)
{
Adverts.service.initialisePlatform(AdvertPlatform.PLATFORM_ADMOB, myAppId);
if (Adverts.service.interstitials.isSupported)
{
// etc...
}
else trace("Interstitials not supported");
What am I doing wrong, or what could I do to find out what I am doing wrong?
(Could not add the adverts tag to this question because not enough reputation)
Check what the value of your myAppId is.
That first error would indicate that it is null and the initialisePlatform() call is failing.
Into a flow i raised and error and i would like to test it in Munit.
The documentation doesn't seem to contain and explain this particular case.
what is the text that i need to insert into :
expected error type
expected exception
All errors thrown in Mule contain meta-data including a TYPE.
For example, here is a list of some specific HTTP: errors thrown by the HTTP module:
HTTP:UNSUPPORTED_MEDIA_TYPE
HTTP:CONNECTIVITY
HTTP:INTERNAL_SERVER_ERROR
HTTP:METHOD_NOT_ALLOWED
Each module's documentation should contain all specific error types thrown by that module. Here is the HTTP one example: https://docs.mulesoft.com/connectors/http/http-documentation#throws
In your screenshot for example it uses APIKIT module. APIKIT module has its own errors again. Think of it as certain Java classes throwing custom exceptions specific to that class.
And here is a full list of core error types you can catch like EXPRESSION for example:
https://docs.mulesoft.com/mule-runtime/4.1/mule-error-concept
The attribute expectedErrorType expects an error type ID that needs to be defined inside the application being tested. This attribute allows you to validate that a defined error type in your application is thrown. If you define an errorType that does not exists in your application, the test does not run.
<munit:test name="MUnit-test-suite"
description="Test Error Type"
expectedErrorType="FTP:ILLEGAL_PATH">
...
</munit:test>
This Error Type test expects that an FTP operation will throw an FTP:ILLEGAL_PATH error.
You will need to configure this for your specific type you are expecting.
The attribute expectException expects a literal exception class name (canonical form). When you provide a literal value, it should take the form of the canonical class name of the exception that is expected. In these cases, Mule always throws a MuleMessagingException. MUnit validates the provided classname if the underlying cause of the MuleMessagingException thrown is of the exact same type.
<munit:test name="testExceptions"
description="Test Exceptions"
expectedException="java.lang.RuntimeException">
...
</munit:test>
If you define that your test expects an exception and none is thrown, the test fails immediately.
So you don't need to provide both.
I am unable to scroll down to the save button at the end of the page. Have tried using scrollToElement function but it does not work.
The error given :
Test Cases/merchantAdd1 FAILED because (of) groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.scrollToElement() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject)
This doesn't necessarily mean you are unable to scroll to an element. You are missing a parameter.
The error message is saying you are trying to pass the wrong types of argument to scrollToElement() function. It is expecting a TestObject and an int (timeout in seconds) and you are passing in only the test object.
It should be something like
WebUI.scrollToElement(findTestObject('your test object'), 3)
If you are unable to find Test Object, and it is at the bottom of the page, try scrolling to position high absisse and ordinate.
for example WebUI.scrollToPosition(9999999, 9999999)
Then try click on the Objct
Is VS2010, I analyzed my code and got this error:
Warning 64 CA1050 : Microsoft.Design : 'ApplicationVariables' should be declared inside a namespace. C:\My\Code\BESI\BESI\App_Code\ApplicationVariables.vb 10 C:\...\BESI\
Here is some reference info on the error. Essentially, I tried to create a class to be used to access data in the Application object in a typed way.
The warning message said unless I put my (ApplicationVariables) class in a Namespace, that I wouldn't be able to use it. But I am using it, so what gives?
Also, here is a link to another StackOverflow article that talks about how to disable this warning in VS2008, but how would you disable it for 2010? There is no GlobalSuppressions.vb file for VS2010.
Here is the code it is complaining a bout:
Public Class ApplicationVariables
'Shared Sub New()
'End Sub 'New
Public Shared Property PaymentMethods() As PaymentMethods
Get
Return CType(HttpContext.Current.Application.Item("PaymentMethods"), PaymentMethods)
End Get
Set(ByVal value As PaymentMethods)
HttpContext.Current.Application.Item("PaymentMethods") = value
End Set
End Property
'Etc, Etc...
End Class
I suspect that the code you entered is in your App_Code fodler of your web app. This code is accessible from your web code as you have deomnstrated but is not accessible from any other assembly.
You can suppress the instance of the error by right mouse clicking on the particular error and selecting "Suppress Message In Source." That'll result in code being added to your source that says "the next time you check this error-fuggedabodit!"
When to Suppress Warnings
--------------------------------------------------------------------------------
While it is never necessary to suppress a warning from this rule, it is safe to do this when the assembly will never be used with other assemblies.
To suppress the error on all occurences, select "Suppress in Project Suppression File"