Firefox Add-On Builder: ModuleNotFoundError - firefox-addon-sdk

I'm trying to create a Firefox add-on using Mozilla's Add-On Builder, but when I try to use simple code from the documentation:
var sidebar = require("sdk/ui/sidebar").Sidebar({
id: 'my-sidebar',
title: 'My sidebar',
url: require("sdk/self").data.url("sidebar.html")
});
I receive the following error:
"ModuleNotFoundError: unable to satisfy: requries(sdk/ui/sidebar) from ....."
Currently I'm using the default SDK 1.14 in the Add-On Builder

This is because Builder has not been updated since SDK 1.14 and is attempting to find the sidebar library which is only available in Firefox 26.
My best suggestion would be to download the current beta of SDK 1.15 and use the command-line:
https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.15b1.zip
Once you have downloaded the SDK, please see the installation documentation for how to get things going:
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/installation.html

Related

Error: package com.huawei.hms.maps.util does not exist when using HMS Map SDK 5.1

My Android app worked well with Huawei Map SDK 5.0.0 or lower version. When upgrading to Map SDK 5.0.1 or above version however, I get the error: package com.huawei.hms.maps.util does not exist when using:
import com.huawei.hms.maps.util.LogM;
import com.huawei.hms.maps.util.AssetBitmapDescriptor;
I tried several solutions, but none of them worked. Can someone help?
To resolve the issues on your Android app when using Huawei Map SDK 5.0.1 or above, you need to do the followings:
use Android API android.util.Log to replace com.huawei.hms.maps.util.LogM
for com.huawei.hms.maps.util.AssetBitmapDescriptor, use the corresponding method in BitmapDescriptorFactory to replace it. Please refer to the links for details:
Link 1 and link2.

Python - You are calling a deprecated version of the Ads API

Seems this is a commun issue when using Facebook APIs. I am trying to use the ads API using Python. When I am testing it using the Graph API Explorer, I have the version 9.0 and I am not getting any errors. I am trying to implement the API call using Python but when I am specifiying the version 9.0, I am getting this error log:
facebook.GraphAPIError: Valid API versions are '2.8', '2.9', '2.10', '2.11', '2.12', '3.0', '3.1'
My code:
import facebook
token = "<token>"
graph = facebook.GraphAPI(access_token=token, version="9.0")
events = graph.request("?ids=<id>")
print(events)
But when I am using the version 3.1 or < than 3.1, I am getting another error:
facebook.GraphAPIError: (#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v9.0.
How can I fix it?
Seems related to an older SDK (see the code on github)
I suggest you to update to the official Facebook SDK for Python

ionic3 plugin and platform errors

I am using ionic CLI version 3.0.0-beta.5
When I am trying to install native plugins, I am getting these errors.
for example, installing social-sharing plugin
ionic plugin add cordova-plugin-x-socialsharing
and the error is
[ERROR] Unknown plugin: #ionic/cli-plugin-.
same error while adding platforms also..
C:\Users\varun\Desktop\apps\app>ionic platform add android
The platform command is no longer available. To find out more about the equivalent please run:
ionic cordova:platform --help
C:\Users\varun\Desktop\apps\app>ionic cordova:platform --help
[ERROR] Unable to find command: cordova:platform. It is possible that you are trying to get help on a project based command and you are not in a project directory.
Has anyone faced this problem? I am not getting enough information on official blog.
To fix "The platform command is no longer available" issue on Ionic3 beta 7 I tried the following:
ionic cordova:platform add android
However, it only worked for newly started projects so need to update ionic-scripts in your project.
Use this instead
cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git
The repo name cordova-plugin-x-socialsharing is changed/missing
so, we can directly add plugin from plugin git repo.
shareWithOptions(option, successcallback, errorcallback);
Usage :
window.plugins.socialsharing.shareWithOptions( {
message: 'share this',
subject: 'the subject',
files: ['', ''],
url: 'https://www.gooogle.com',
chooserTitle: 'Pick an app'
},
function(success){
console.log(success);
},
function(err){
console.log(err);});

Unable to locate command :: org.apache.cordova.facebook.Connect

Windows Phone 7 app development with cordova 2.3.0. I get the error 'Unable to locate command :: org.apache.cordova.facebook.Connect' on FB.login. I started off with the code base that works fine in Android. What am I missing or not doing right on Windows? Any detailed documentation about PhoneGap WP7 and Facebook plugin integration?
try to set the namespace in call method:
look my example:
Cordova.exec(null, null, "WP7GapClassLib.PhoneGap.Commands.MyCommand", "SendRequest", args);

Error using barcode scanner in iOS PhoneGap

I am working on barcode scanning App. I have download the sample code from GitHub. When I run that project I get an error. Please help me to solve it.
ERROR: Plugin 'NetworkStatus' not found, or is not a CDVPlugin. Check your plugin mapping in Cordova.plist.
2012-11-28 14:12:36.198 BarCodeScannerCDV[942:40b] FAILED pluginJSON = {"className":"NetworkStatus","methodName":"getConnectionInfo","arguments":["NetworkStatus0"]}
Thanks.
I suggest you to used updated phonegap framework (Cordova 2.2.0), because this was a bug in Cordova 1.6.0.
Please see following comment by Shazron Abdullah in Google Phonegap group:
There is a new Cordova.plist because of the unified JS changes. Check
out the "Cordova Upgrade Guide" in your .dmg (Guides subfolder), or:
"Upgrading Cordova 1.5.0 projects to 1.6.0" step 8 of
https://github.com/apache/incubator-cordova-ios/blob/master/guides/Cordova%20Plugin%20Upgrade%20Guide.md#upgrading-older-cordova-plugins-to-16x
The BarcodeScanner plugin for iOS-Phonegap is stable one, please update your phonegap framework to 2.2.0.
In Phonegap 1.6.0 and below, network connection class name is Network Status but for Phonegap 1.6.1 and above, network connection class name is CDVConnection.