iPhone SQLite encryption with SQLCipher facing errors - ios4

I am trying to learn about the encryption of DB at application level using this tutorial. But I am getting an error that says
sqlcipher/sqlite3.c:11033:25: error: openssl/evp.h: No such file or directory
sqlcipher/sqlite3.c:11034:26: error: openssl/rand.h: No such file or directory
sqlite3.c:11035:26: error: openssl/hmac.h: No such file or directory
and due these there are around 93 more errors in the build process. I have strictly followed the tutorial but I am not able to get rid of those errors.
I have added the path of the source code as instructed in the tutorials but still the problem persists. The screenshot could be seen here

I had the same problem, in my case it was caused by a space in my OPENSSL_SRC path. Enclosing the value of OPENSSL_SRC in double-quotes fixed the problem.

The error messages you are seeing indicate that the compiler can't find the OpenSSL headers included in the SQLCipher code. The most likely problem is that you didn't add the OpenSSL headers to your include path when setting up your project. Perhaps you missed this step in the tutorial: "Look for the “Header Search Paths” setting and add references to $(SQLCIPHER_SRC) and $(OPENSSL_SRC). Check “recursive” on both."
As an aside, the information on that MO article is dated. In the future you can refer to this updated tutorial on the SQLCipher website: http://sqlcipher.net/documentation/ios

After long time i'm not sure whether you fixed this issue or not anyway to fix this do as follows:
In OPENSSL_SRC change destination from "/openssl-1.0.0d" to "/openssl-1.0.0d/include".
thatz it..it has to work.

Related

Angular Build - Uncaught TypeError: Cannot read property 'id' of undefined

I have managed to build my angular app out as a dev build. I haven't done it as a production build yet as it gives me a few errors and i just need to test the dev build.
The dev build process goes fine, no errors or anything. I then use the files from the dist folder in a nginx docker container to host the files.
The problem is nothing is displayed but a white page and in the console i get an error saying 'Uncaught TypeError: Cannot read property 'id' of undefined'. The full message below doesn't seem to point to anything i have written and i've spent several hours searching online but can't find anything on this problem.
I've tried a few different things such as running 'npx ivy-ngcc' which i read manually compiles some stuff. Is there anyway i can get more details on the error to see if it's something i have done?
UPDATE
So i have restored the line that i commented out in main.ts as mentioned in the comments below. I have also tried 'ng build --aot' as suggested which presents me with a series of errors that all seem to relate to devextreme components that are used. I find this strange as i started the project with the devextreme angular starter project from github.
i get messages such as:
'dx-scroll-view is not a valid HTML element'
'node_modules/devextreme-angular/ui/drawer.d.ts - error: appears in
the NgModule.imports of SideNavOuterToolbarModule, but could not be resolved to an NgModule class'
If you go in the devtools and click on Sources, "Don't pause on exceptions" and check "Pause on caught expecptions" and continue until you get the "id error" you will find what module the error is thrown. In my case was a third party library called 'ngx-card/ngx-card' and it's module was the cause of the error (CardModule). Hope this will help find at least the cause of the error
I managed to solve the problem by disabling ivy in the angular compilation options. As soon as i did that it worked building both dev and production versions and is now working perfectly within Nginx.
Thanks to everyone who offered help :)
In tsconfig.json of your Angular project, put this to disable Ivy, the new Angular template engine
{
...
"angularCompilerOptions": {
"enableIvy": false
}
}
Typically, if it's not something that you've written, it tends to be an issue w/ your implementation - i.e. "Visiting a food vendor and ordering a food item they don't provide".
I know it's not a specific answer, but ensuring that you have appropriately configured things in your app.module would be a good first step. Perhaps attempting to build w/ AOT will also give you some more verbose failures that stem from attempting to build out.
Hopefully this helps another poor soul.
To anyone using devextreme, make sure you update your version to at least 19.2.5
https://github.com/DevExpress/devextreme-angular/issues/975#issuecomment-580172291
Starting with version 19.2.5 we support the IVY compiler.
I had the same issue and fixed it by changing from
loadChildren: './app/page/account/account.module#AccountModule'
to
loadChildren: () =>
import('./app/page/account/account.module').then(
(m) => m.AccountModule
)
in app-router.module.ts
The root cause of your error is very likely to be a module that you needed to load explicitly but didn't, or a circular reference in your own modules. Rodrigo has a good answer but to be more specific, you need to find the registerNgModuleType function in Angular's core.js and set a conditional breakpoint on the first line. The condition should be !ngModuleType || !ngModuleType.ɵmod. (You can set a conditional breakpoint in most modern browsers by right-clicking the line number.)
Once you've paused execution just before the exception happens, you can look at the value of ngModuleType if it's not undefined, or walk up a frame or two in the scope and see what the value of imports was.
For me, this issue occurred while using Storybook.
The reason it happened was because of the way I was precompiling the node modules. I was doing:
Incorrect
ngcc --properties es2015 browser module main --first-only
Correct
ngcc
Using this approach fixed it

ENSDFSTATE.dat file not found error while running exampleB1.exe using Geant4

I am new in Geant4. i installed and build GEANT4 using cmake and visual stdio 17 on windlows 10 and now i am trying to practice its given basic exapmles, So, I build first example using cmake by following the toturial given here. The example build successfully and created the exampleB1.exe file. I have set up all environment variables to data installed as given in screen shot
but facing the problem of still relating to environment vairiable is the screenshots of error
I looked this ENSDFSTATE.dat file but could not be able to solve the problem. Any suggestions/ support is highly appreciated.
It looks like your "G4ENSDFSTATEDATA" environmental variable is pointing to the wrong data set. Edit this variable to point to G4ENSDFSTATE2.2 location (i.e. D:\GEANT4\share\Geant4-10.5.1\data\G4ENSDFSTATE2.2 instead of D:\GEANT4\share\Geant4-10.5.1\data\G4PARTICLEXS1.1) and should work fine for that one. Double check your other environmental variables are correct also. Looks like G4ABLADATA should be G4ABLA3.1 for example.
Here is the list of all variables from the getting started manual (http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/InstallationGuide/html/postinstall.html):
Good luck!

What's the correct way to download webrtc source code?

I'm trying to follow the instructions outlined here:
http://www.webrtc.org/native-code/development#TOC-Before-you-start;
but "fetch webrtc" fails with a message that implies a file (src/buildtools/linux32/gn.sha1) is not found. See this post for more detail on the error message:
https://groups.google.com/forum/#!topic/discuss-webrtc/Dt-GRIlLVe4
I've walked through installation of all the "prerequisite software" as described on the above page, but consistently hit the same error. I'm doing this from a Ubuntu 14.04 LTS machine, any thoughts on what I might be doing wrong?
gn is a replacement for gyp to generate Ninja files. I don't think it's required yet (gn is a work-in-progress), but that's likely what you're missing. You could comment out gn from the DEPS and see if things work.
Answering my own question here...
It appears that the problem is related to the fact that I am behind a proxy
and the --no_auth option is used (in depot_tools) when the download_from_google_storage.py script is called.
After reading this post: https://github.com/GoogleCloudPlatform/gsutil/issues/241
I modified my copy of "download_from_google_storage.py" so that the --no_auth option would have no affect. I also created a ~/.boto file with three lines:
[Boto]
proxy = my.proxy.goes.here.com
proxy_port = PROXY_PORT_NUMBER
Then I re-ran "fetch webrtc" and it completed successfully in about 75 minutes.
Go figure...

Build is producing a .momd in the bundle that is missing the .mom file

I have an app that has been running fine on the iPhone simulator for some time. Recently, I decided I wanted to re-use the data model and related classes in another project - so I dragged them from this project window to the other then told Xcode not to copy, just to make references. At first this didn't work so I jumped through a number of hoops to try to fix it (I may be asking more about that in another post). After all this, I re-compiled and tried to run the original app -- and it's not working any more. On further investigation, I discovered that when I re-compile the original app, I end up with a bundle that contains a .momd package but it contains only a Versioninfo.plist file - no .mom file, no .omo file like I'm expecting to see. I don't recall making any changes to the original app. I don't get any warnings. I just get an incomplete .momd package (and, not surprisingly, my app now crashes).
What's going on here?
BTW, the app now crashes with this message:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
Which I get when executing this line of code:
self.productRegistry = [[UIManagedDocument alloc] initWithFileURL:self.productRegistryURL];
I figured this out by looking more closely at the file locations in the project directory using Finder. In the Xcode window, everything looks normal but in the actual project directory I found that the .datamodeld package had ended up at the top level of the project directory -- at the same level as the project package itself. Xcode apparently did not like this but unfortunately it did not complain -- it just created a partial build output. Once I moved the .datamodeld package into the same folder as the rest of the project's code, everything worked just fine.
This would appear to be just a quirk. I would expect that Xcode would either see that all is well and build correctly OR it would see that things weren't quite as they should be and fail. In this case, it did not build correctly but was silent about it.
Hope this answer helps someone else someday.

DoNotChange was not found when adding new files

When I attempt to add a new file to the solution -- even a general C# empty class, I get an error:
The requested value 'DoNotChange' was not found. See screenshot.
This just started happening yesterday. I installed the monotouch-4.0.0.dmg, but have since rolled back to 3.2.6, but the problem remains.
I think there may be a fairly widespread issue, as this new StackOverflow question seems eerily similar.
Anyone have any ideas on how to recover?
Environment:
MonoTouch Professional 3.2.6 (4.0.0)
MonoDevelop 2.4.2 release 20402004
OSX 10.6.7
UPDATE: On a whim I tried to create a new empty .cs file outside of MT, and then add it to the project -- that worked, so at least there is a temporary workaround.
It looks like your formatting policy options are triggering a bug in the code formatter. Try resetting it by removing the file ~/.config/MonoDevelop/DefaultPolicies.xml

Resources