EvanBetterAuthorizationSample Integration Issue - macos

I am trying to store PASSWORD AND SHAREDSECRETKEY in SYSTEM keychain and for that i am using Apple'sEvanBetterAuthorizationSample code.
I tried to use SMJobBlessUtil.py tool.
I tried the 1st function to “setreq” which is giving me error as below.
Traceback (most recent call last):
File "./SMJobBlessUtil.py", line 424, in <module>
main()
File "./SMJobBlessUtil.py", line 418, in main
setreq(appArgs[1], appArgs[2], appArgs[3:])
File "./SMJobBlessUtil.py", line 360, in setreq
appToolDict[bundleID] = toolNameToReqMap[bundleID]
KeyError: ‘myappbundleid'
and then I try check command which is saying me that app code signature invalid.
./SMJobBlessUtil.py check build/Debug/EvenBetterAuthorizationSample.app : app code signature invalid
It looks like there is some thing wrong with my certificates.
I just replace com.example.apple-samplecode.EBAS to my application bundle id everywhere and selected my application’s provisioning profile.
I follow steps from readme file's Adopting this technology Section from EvenBetterAuthorizationSample code as Apple says they are the integration steps but it doesn't looks like steps as i didn't find any proper implementation step.
Can any one guide me in this where else i still need to make changes.
Thanks

Under HelperTool target > Build Settings: Make sure that "Product Name and "Product Module Name" are the same as the Helper Tool identifier.

It was a silly mistake that my Bundle ID and Helper Tool id Does not match and that cause me errors.

Related

cqlsh will not run on OS X

I installed Cassandra on Big Sur 11.4 using homebrew, and when I tried to run cqlsh, I received this error.
isaackim#Isaacs-MacBook-Pro bin % cqlsh
Traceback (most recent call last):
File "/usr/local/Cellar/cassandra/3.11.10/libexec/bin/cqlsh.py", line 2458, in <module>
main(*read_options(sys.argv[1:], os.environ))
File "/usr/local/Cellar/cassandra/3.11.10/libexec/bin/cqlsh.py", line 2232, in read_options
configs.read(CONFIG_FILE)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 305, in read
self._read(fp, filename)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 512, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
I previously had Anaconda3 installed, and received the same error (the only difference was the path to cqlsh.py). I thought it might be an issue with Anaconda so I uninstalled Anaconda entirely, then I reinstalled Cassandra using homebrew.
I would appreciate any and all suggestions. Thanks in advance.
Thanks to Alex Ott's suggestion, I managed to replicate the issue you posted by creating a bad ~/.cassandra/cqlshrc configuration file which only contains the following line:
username = alice
As this error suggests:
ConfigParser.MissingSectionHeaderError: File contains no section headers.
the configuration parser detected that there are no section headers in the file. Section headers are line entries enclosed in square brackets ([header_name]). For example:
[authentication]
username = alice
password = Som3Comp7exPa$$word
Review your cqlshrc and make the necessary corrections. If necessary, use the example cqlshrc.sample file in conf/. Cheers!

Couldn’t link model to ‘en_core_web_md’ on a Windows 10

I tried to try a chatbot made by a friend of mine with Rasa on a Windows 10. Getting started with the installation of the backend through their tutorial I was surprised that I couldn't link model to 'en_core_web_md' after using python -m spacy link en_core_web_md en. Here is the full error message:
Error: Couldn't link model to 'en_core_web_md'
Creating a symlink in spacy/data failed. Make sure you have the required
permissions and try re-running the command as admin, or use a
virtualenv. You can still import the model as a module and call its
load() method, or create the symlink manually.
C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\en_core_web_md
-->
C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\spacy\data\en_core_web_md
Creating a shortcut link for 'en' didn't work (maybe you don't have
admin permissions?), but you can still load the model via its full
package name: nlp = spacy.load('{name}')
Download successful but linking failed
(cha_env36) C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation>
(cha_env36) C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation>python -m spacy link en_core_web_md en
Error: Couldn't link model to 'en'
Creating a symlink in spacy/data failed. Make sure you have the required
permissions and try re-running the command as admin, or use a
virtualenv. You can still import the model as a module and call its
load() method, or create the symlink manually.
C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\en_core_web_md
-->
C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\spacy\data\en
Traceback (most recent call last):
File "C:\Python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\spacy\__main__.py", line 31, in <module>
plac.call(commands[command], sys.argv[1:])
File "C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\plac_core.py", line 328, in call
cmd, result = parser.consume(arglist)
File "C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\plac_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\spacy\cli\link.py", line 48, in link
symlink_to(link_path, model_path)
File "C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\spacy\compat.py", line 87, in symlink_to
orig.symlink_to(dest)
File "C:\Python36\lib\pathlib.py", line 1327, in symlink_to
self._accessor.symlink(target, self, target_is_directory)
File "C:\Python36\lib\pathlib.py", line 393, in wrapped
return strfunc(str(pathobjA), str(pathobjB), *args)
OSError: symbolic link privilege not held
(cha_env36) C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation>sudo python -m spacy link en_core_web_md en
C:\Python36\python.exe: No module named spacy
It's weird because I was able to do so on Ubuntu.
Do you have any idea ?
This is a known problem. In fact your error message is giving exactly what went wrong. The script could not create Symbolic link (a Shortcut) for en_core_web_md. Perform the following to fix the issue
Goto your directory: C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\spacy\data\
Create a shortcut to destination: C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\en_core_web_md
Name it as en
If you want to know how to create the shortcut, following screenshots might help
Goto the folder, C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\spacy\data\ and right click and create shortcut
Provide the target directory: In you case it is
C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation\cha_env36\lib\site-packages\en_core_web_md
Then click on Next
You have to name the shortcut as en. Then click on Finish
Following the log that you have provided.
Is possible to be a permission problem.
Try to open CMD with Administrator privileges, and then run spacy link command again.
What I did was open bash as admin, then run the command:
python -m spacy link en_core_web_md en
If you are using a virtualenv make sure to activate the said virtualenv first.
You can also use the mklink command in cmd to create a symbolic link in the desired folder.
MKLINK [[/D] | [/H] | [/J]] Link Target
/D Creates a directory symbolic link. Default is a file
symbolic link.
/H Creates a hard link instead of a symbolic link.
/J Creates a Directory Junction.
Link Specifies the new symbolic link name.
Target Specifies the path (relative or absolute) that the new link
refers to.

A sealed resource is missing or invalid

I'm trying to deploy my game made with Unity on Mac Store, but got this error during the validation process. I don't know how to correct. Do you have any ideas please ?
Invalid Signature - The main app bundle Kissoro at path Kissoro.app
has following signing error(s):
--prepared:/Volumes/data01/app_data/dstr/mz_8224354388357841556dir/mz_8662652241696651587dir/com.masseka.game.studio.Kissoro.pkg/Payload/Kissoro.app/Contents/Frameworks/libcrypto.dylib
--validated:/Volumes/data01/app_data/dstr/mz_8224354388357841556dir/mz_8662652241696651587dir/com.masseka.game.studio.Kissoro.pkg/Payload/Kissoro.app/Contents/Frameworks/libcrypto.dylib
--prepared:/Volumes/data01/app_data/dstr/mz_8224354388357841556dir/mz_8662652241696651587dir/com.masseka.game.studio.Kissoro.pkg/Payload/Kissoro.app/Contents/Frameworks/libssl.dylib
--validated:/Volumes/data01/app_data/dstr/mz_8224354388357841556dir/mz_8662652241696651587dir/com.masseka.game.studio.Kissoro.pkg/Payload/Kissoro.app/Contents/Frameworks/libssl.dylib
--prepared:/Volumes/data01/app_data/dstr/mz_8224354388357841556dir/mz_8662652241696651587dir/com.masseka.game.studio.Kissoro.pkg/Payload/Kissoro.app/Contents/Frameworks/Mono/MonoEmbedRuntime/osx/libmono.0.dylib
--validated:/Volumes/data01/app_data/dstr/mz_8224354388357841556dir/mz_8662652241696651587dir/com.masseka.game.studio.Kissoro.pkg/Payload/Kissoro.app/Contents/Frameworks/Mono/MonoEmbedRuntime/osx/libmono.0.dylib
--prepared:/Volumes/data01/app_data/dstr/mz_8224354388357841556dir/mz_8662652241696651587dir/com.masseka.game.studio.Kissoro.pkg/Payload/Kissoro.app/Contents/Frameworks/Mono/MonoEmbedRuntime/osx/libMonoPosixHelper.dylib
--validated:/Volumes/data01/app_data/dstr/mz_8224354388357841556dir/mz_8662652241696651587dir/com.masseka.game.studio.Kissoro.pkg/Payload/Kissoro.app/Contents/Frameworks/Mono/MonoEmbedRuntime/osx/libMonoPosixHelper.dylib
/Volumes/data01/app_data/dstr/mz_8224354388357841556dir/mz_8662652241696651587dir/com.masseka.game.studio.Kissoro.pkg/Payload/Kissoro.app:
a sealed resource is missing or invalid . Refer to the Code Signing
and Application Sandboxing Guide at
http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.html
and Technical Note 2206 at
https://developer.apple.com/library/mac/technotes/tn2206/_index.html
for more information.
All you have to do is to manually codesign every file in Contents/Frameworks and Contents/Plugins directories inside .app file and to delete all .meta files inside your plugin. After U do these steps, You codesigned once more the whole .app file and create a package which You can uploaded on iTunes Connect without warning mentioned above.
More info: https://forum.unity.com/threads/signing-mac-app-on-os-x-mavericks.206762/

Package Control, "Install Package" Shows nothing when entered

I'm using Sublime Text 3 on Windows 7 with Package Control installed, and I want to install a couple packages for syntax highlighting. I'm told I have to do this by hitting Ctrl+Shift+P and clicking 'Package Control: Install Package'. At that point something is supposed to appear where I can enter text, but as far as I can tell all it does is say, 'Loading Repositories [=====]' at the bottom for a half second and then stop. Besides the main editor window, there's nowhere else new to enter text or a link or something. Am I missing something from the process, or did I not understand one of the steps correctly?
Edit: It shows this error message in the console whenever I try to access the list of packages;
Exception in thread Thread-6:
Traceback (most recent call last):
File "./threading.py", line 901, in _bootstrap_inner
File "package_control.commands.install_package_command in S:\Users\Nicholas\AppData\Roaming\Sublime Text 3\Installed Packages\Package Control.sublime-package", line 43, in run
File "package_control.package_installer in S:\Users\Nicholas\AppData\Roaming\Sublime Text 3\Installed Packages\Package Control.sublime-package", line 54, in make_package_list
File "package_control.package_manager in S:\Users\Nicholas\AppData\Roaming\Sublime Text 3\Installed Packages\Package Control.sublime-package", line 260, in list_available_packages
File "package_control.downloaders.background_downloader in S:\Users\Nicholas\AppData\Roaming\Sublime Text 3\Installed Packages\Package Control.sublime-package", line 52, in get_provider
KeyError: 'http://merlinthered.github.com/sublime-rainmeter/'
As far as I can tell, the error is simply saying that it can't download, access or parse a certain package. You may get more information about the specific error by posting it to the Package Control GitHub issues page as the someone that knows the inner workings of the package control might be able to help you better.
You could try an reinstall of Sublime Text 3 and the Package Control. You may want to back-up your settings and packages, in case you want to go back to the current setup. You can find these using Preferences > Browse Packages.

Resurrecting old PLT-Scheme project (pre-1999)

I'm trying to resurrect an old (1999 or earlier) project written in Scheme (PLT-Scheme, using the mzscheme interpreter (?) commandline tool). To make the matters worse, I don't know Scheme, or Lisp (in fact, I want to learn, but that's another story).
I have the source code of the project at:
github.com/akavel/sherman
Now, when running the code, it bails out with an error message like below:
Sherman runtime version 0.5
Hosted on MzScheme version 52, Copyright (c) 1995-98 PLT (Matthew Flatt)
reference to undefined identifier: list->block
(I've tried PLT-Scheme versions 52, 53, 103, 103p1. Earlier versions don't allow mzscheme -L option, which is referenced in the sherman.bat script used in the project. Later versions also have some more serious problems with the code or options.)
The difficulty is, that from what I see, list->block actually is defined - see: collects/sherman/BLOCK.SS line 48. So, what is wrong?
To run the code, I perform the following steps:
Download PLT-Scheme v. 103p1 (from the old versions download page - first closing the "PLT Scheme is now Racket" banner) - for Windows, use: mz-103p1-bin-i386-win32.zip.
Unzip (e.g. to directory c:\PLT).
Copy c:\sherman\collects\sherman directory with contents to: c:\PLT\collects\sherman (where c:\sherman contains the contents of the github repository).
Run cmd.exe, then cd c:\sherman.
set PATH=c:\PLT;%PATH%
sherman.bat run trivial.s
this command is in fact, from what I understand, equivalent to:
(require-library "runtime.ss" "sherman")
(parameterize ((current-namespace sherman-namespace)) (load "trivial.s"))
(current-namespace sherman-namespace)
After that, I get the error as described above (MzScheme version would be reported as 103p1 or whatever).
Could you help me solve the problem?
EDIT 2: SOLVED!
To whom it may concern, I've added a fully fledged "How to use this project" instruction on the project page, detailing the solution to the problem thanks to soegaard's help.
In short:
copy trivial.s trivial.rs
rem (the above is workaround for problems with 'r2s.exe < trivial.r > trivial.rs')
sherman.bat compile trivial.rs
sherman.bat run trivial.zo
rem (or: sherman.bat run trivial.ss)
Not an answer, but a few notes too big for a comment.
1. Sanity Check
The error message says list->block is undefined.
Make sure that the code in block.ss is run, by
inserting (display "block.ss is loaded!") in block.ss
just to make sure, the code is run.
2. Random Thoughts
The file blocks.ss begins with:
(require-library "functios.ss")
(require-library "synrule.ss")
(require-library "stream.ss" "sherman")
The file "sherman/stream.ss" is in the repository,
but where is "synrule.ss" and "functios.ss" ?
Ah... This code is old! Here is a description of
how require-library worked. It lists functios.ss
and synrule.ss as part of MzLib.
http://www.informatik.uni-kiel.de/~scheme/doc/mzscheme/node158.htm
Let's check out how require-library worked:
When require-library is used to load a file, the library name and the
resulting value(s) are recored in a table associated with the current
namespace. If require-library is evaluated for a library that is
already registered in the current namespace's load table, then the
library is not loaded again; the result(s) recorded in the load table
is returned, instead.
So when the code in block.ss is run, the names are stored in a namespace. If the current namespace is the wrong one, when the code in block.ss is evaluated, it would explain you error message of list->block being undefined.

Resources