sublimeLinter "Error trying to parse file: Expected value in Packages/User/Default (OSX).sublime-keymap:2:1" - sublimelinter

Error: "Error trying to parse file: Expected value in Packages/User/Default (OSX).sublime-keymap:2:1"
Hello, I have googled this and only found old documentation posts and answers for this problem that was on ST2 but not 3 and was posted in 2013.
I also have tried visiting the troubling shooting in the official site for sublimeLinter and the error does not seem to be listed. I guess I am one of the few who are running into this.
I am fairly new to using a text editor like ST3, so some of the terminology I am not too familiar with.
Is it possible anyone may help me with this?
So far I have attempted:
Preference>Package Control> User Settings/ Which is empty and attempted typing in some of the old answer problems.
I also attempted in pasting in:
[
{ "keys": ["ctrl+t","u"], "command": "upper_case" },
{ "keys": ["ctrl+t","l"], "command": "lower_case" }
]
that was from an answer in a older post that I found. However, the problem still persist and I ran into a brick wall when attempting to find more answers. Any help would be appreciated.
Thank you for reading.

This is an old question but I came across the same error message having tried to use the sublime linter package(s) and then deciding to uninstall. After I did this I got a similar error message to the one you describe.
I opened Preferences->Key Bindings and found the following line in the Default (OSX).sublime-keymap-User file:
/User/Default ().sublime-keymap
I commented this line out so that I now have an empty file and the error on startup has disappeared.

Related

Authentication with sp-rest-proxy / node-sp-auth

I am getting 403 errors with sp-rest-proxy. I was originally using the “User Credentials” strategy which allowed me to GET data, but not POST it. So now I’m am trying the “Addin only permissions”. My I.T. team was able get the app registered for me. but I am still receiving the below error now even with GET.
Error Details:
{
"readyState": 4,
"responseText": "{\"error\":{\"code\":\"-2147024891, System.UnauthorizedAccessException\",\"message\":{\"lang\":\"en-US\",\"value\":\"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))\"}}}",
"responseJSON": {
"error": {
"code": "-2147024891, System.UnauthorizedAccessException",
"message": {
"lang": "en-US",
"value": "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
}
}
},
"status": 403,
"statusText": "Forbidden"
}
Things I suspect I messed up on:
I strongly think its my server/private config I have the following…
const RestProxy = require('sp-rest-proxy');
const settings = {
configPath: './config/private.json',
port: 8081,
};
const restProxy = new RestProxy(settings);
restProxy.serve();
and private (not the actual values I am using expect for "strategy" )
{
"siteUrl": "https://ORGANIZTION.sharepoint.com",
"strategy": "OnlineAddinOnly",
"clientId": "0000000-000000-000000-0000-00000000",
"clientSecret": "000000000000000000000000000000",
"realm": "00000-0000-0000-0000-000000"
}
I couldn’t find much on the “strategy” value on the sp-rest-proxy or the node-sp-auth side of the documentation. I can assume its OnlineAddinOnly but I’m not able to find the specific syntax for what possible values this attribute expects. I also noticed that the “clientSecret” is changing once I run the server, I assume this is an intentional encryption.
During the App registration phase (step 5 of this https://github.com/s-KaiNet/node-sp-auth/wiki/SharePoint%20Online%20addin%20only%20authentication) I had the IT folk set the “right” attribute in AppPermissionRequests to “Write” instead “FullControl”, I noticed that “FullControl” seems to be used in most example though I wasn’t sure if it was required. Can anyone confirm that?
[Edit: confirmed this is not the issue by setting this to FullControl]
Intention:
I am trying to build an internal data management tool that only needs to work on localhost to get manipulate and replace json files in my teams SharePoint. (just in a nice way so that non-coders can do this). The “sp-rest-proxy” library seems to be what I need to implement the REST API effectively in react.
As far as I know, SharePoint app-only access is disabled by default. You need to ask your administrator to enable it by running the following command:
set-spotenant -DisableCustomAppAuthentication $false
The answer likely in the XML AppPermissionRequests. The creator of the library was able to point me to a better example and I had noticed some differences we had a different scope value and no AllowAppOnlyPolicy adding these seems to have fixed most of the issue. I am able to confirm that I can now do GET.
I am still having issues with GetFolderByServerRelativeUrl and using the to add/replace files but I am not sure that is related and will treat it as a separate issue as it may not be related to sp-rest-proxy or node-sp-auth
the correct AppPermissionRequests XML should be this ->
and as #Michael Han_MSFT mentioned you should ensure that DisableCustomAppAuthentication is set to false
<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" />
</AppPermissionRequests>

Content Script Warning, Unexpected Property Found (Firefox WebExtensions)

After typing out a tutorial code and adjusting the details/regex as follows:
{
"manifest_version" : 2,
"name" : "Paige",
"version" : "1.0",
"description" : "Gathers and displays a custom web feed",
"content_scripts": [
{
"matches": ["*://*.google.com/*"],
"js": ["paige.js"]
}
],
"permissions" : [
"*://*.google.com/*"
]
}
I proceed to about:debugging and click Load Temporary Add-on.... I then select this manifest from my computer (which does indeed share a folder with a paige.js. This results in the following message:
Reading manifest: Warning processing content_script: An unexpected property was found in the WebExtension manifest.
I have double-checked with the tutorial and with the documentation, but I can't seem to determine the problem. The only related help I could find on this subject addressed the following error:
Reading manifest: Error processing content_script: An unexpected property was found in the WebExtension manifest.
This is not the same issue (as far as I can tell) given that mine is a warning and theirs is an error. Regardless, I checked the listed solution and it was not relevant. If anyone can help me discover my mistake, I would very much appreciate it.
This answer is two-fold.
My issue was apparently a file-explorer issue, such that when I saved my file it saved to a new location rather than applying the changes to the original file location. This has now been resolved.
As far as the Warning vs. Error semantics go, they seem to be identical after all. For those wondering, this can be resolved by changing "content_script" to "content_scripts".

Android Manifest merger error in Codename One

In a bare bones project, I added these build hints:
android.gradleDep=compile 'com.erikagtierrez.multiple_media_picker:multiple-media-picker:1.0.5'
android.min_sdk_version=23
I would like to import the following Android library to make a CN1Lib (that requires at least Android SDK 23):
https://github.com/erikagtierrez/multiple-media-picker
To be short: I spent one day trying to import that, I also experimented with Android Studio and with suggestions found on Stack Overflow (trying to make a custom .aar), without success.
Could you help me to import that library? There is manifest merger error.
In fact, the issue reported by the build server is:
* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed : Attribute application#label value=(BareBones) from AndroidManifest.xml:15:17-42
is also present at [com.erikagtierrez.multiple_media_picker:multiple-media-picker:1.0.5] AndroidManifest.xml:23:9-41 value=(#string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:15:3-43:103 to override.
I also tried to add the build hint:
android.xapplication_attr=tools:replace="android:label"
as suggested by the previous error, without success.
In the last case, I get:
Merging result: ERROR
/tmp/build1659178556337293135xxx/Test/src/main/AndroidManifest.xml:15:3-43:103 Error:
tools:replace specified at line:15 for attribute android:label, but no new value specified
/tmp/build1659178556337293135xxx/Test/src/main/AndroidManifest.xml Error:
Validation failed, exiting
-- Merging decision tree log ---
The last full log is here: https://gist.github.com/jsfan3/dd6c23f86a2ac949f996910c8cece62b
Thank you
This is happening because our code things you injected android:label on your own and doesn't inject it to avoid collision...
Change the code to this:
android.xapplication_attr=tools:replace="android:label" android:label="App Name"

Getting StringIndexOutOfBoundsException when attempting to create a new Form in Codenameone

I am using Netbeans and updated to use the latest codenameone plugin. I am trying to follow the walkthrough tutorial at http://www.codenameone.com/blog/gui-builder-walkthru.html, but I keep on getting a StringIndexOutOfBoundsException when attempting to generate a new Form using the NewGuiBuilderWizardIterator. The following is the stacktrace that I'm seeing. Any and all help would be greatly appreciated!
SEVERE [com.codename1.actions.OpenGuiBuilderAction]: Relative path com\mycompany\myapp\MyApp.java
SEVERE [com.codename1.actions.OpenGuiBuilderAction]: Gui file C:\Users\joshua\Documents\NetBeansProjects\TestGui1\res\guibuilder\com\mycompany\myapp\MyApp.gui
SEVERE [com.codename1.actions.OpenGuiBuilderAction]: Props C:\Users\joshua\Documents\NetBeansProjects\TestGui1\codenameone_settings.properties
SEVERE [com.codename1.actions.OpenGuiBuilderAction]: The GUI file doesn't exist!
WARNING [org.openide.filesystems.Ordering]: Found same position 100 for both Loaders/application/res/Actions/org-openide-actions-OpenAction.shadow and Loaders/application/res/Actions/sep-1.instance
WARNING [org.netbeans.modules.java.JavaTemplateAttributesProvider]: No classpath was found for folder: C:\Users\joshua\Documents\NetBeansProjects\TestGui1#b78894d2:1aed2d64
WARNING [org.openide.WizardDescriptor]
java.lang.StringIndexOutOfBoundsException: String index out of range: -4
at java.lang.String.substring(String.java:1919)
at com.codename1.NewGuiBuilderWizardIterator.instantiate(NewGuiBuilderWizardIterator.java:95)
at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1046)
at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:605)
at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:439)
at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:248)
at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:160)
at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1629)
at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1570)
at org.openide.WizardDescriptor.access$2300(WizardDescriptor.java:92)
[catch] at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2257)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
You need to select a package when you do this and not the top level project since the code won't recognize that situation and won't know where to place the GUI file.
Notice that since an XML GUI file is created in the background, refactoring after the fact won't work well so this isn't something we should generally fix.

Getting 404 error following Tipfy's Hello World tutorial

I'm sure I am missing something embarrassingly obvious here, but as I am following Tipfy's Hello World tutorial, I'm getting nothing but Werkzeug's 404 page whenever I try to load one of the URLs defined in my urls.py file (in /project/app/apps/hello_world).
I've ensured that 'apps.hello_world' is in the list of installed apps in the 'apps_installed' dictionary in config.py. Everything else seems to be in order, and I've read & followed the instructions in the tutorial and Getting Started guide carefully, but I can't see why Tipfy isn't detecting the rules I defined in get_rules() in my hello_world app's urls.py file.
Here is the code from that file:
from tipfy import Rule
def get_rules(app):
rules = [
Rule('/', endpoint='hello/world', handler='handlers.HelloWorldHandler'),
Rule('/hello-jinja', endpoint='hello/jinja', handler='handlers.HelloJinjaHandler'),
Rule('/hello-json', endpoint='hello/json', handler='handlers.HelloJsonHandler'),
Rule('/hello-ajax', endpoint='hello/ajax', handler='handlers.HelloAjaxHandler'),
]
return rules
Any help anyone can offer is greatly appreciated - thanks!
Nevermind. I solved it. Although it was nowhere in the Tipfy documentation that I could find, and despite the fact that I'm still a solid newbie with Python, I guess I should have known that my 'hello_world' directory in the apps directory needed an __init__.py file in order to be treated as a module

Resources