Giter VIP home page Giter VIP logo

couchbase_ti's People

Contributors

pegli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

couchbase_ti's Issues

Error "Couldn't find module..."

First of all, thanks for your work here.

I am having trouble getting this working in my titanium project. I followed your instructions and did a build for iOS from scratch. I copied the generated ZIP file into /Library/Application Support/Titanium/mobilesdk/1.7.1 - which is the version I am building with.

I changed tiapp.xml:

<module platform="iphone" version="1.0">com.obscure.couchbase_ti</module>

I added the following code to my app.js:

var couchbase = require('com.obscure.couchbase_ti');
var serverUrl;
server.addEventListener("com.obscure.couchbase_ti.server_started", function(e) {
  serverUrl = e.serverUrl;
});
server.startCouchbase();

In the Console I can see the following relevent lines:

[DEBUG] Detecting modules in /Users/Matthew/Titanium/XXX/modules
[DEBUG] Detecting modules in /Library/Application Support/Titanium/modules
[DEBUG] Looking for Titanium Module id: com.obscure.couchbase_ti, version: 1.0, platform: iphone
[INFO] Skipping JS compile, running from simulator
Syntax error at 'LexToken(:,':',1,418)'
Syntax error at 'LexToken(/,'/',1,447)'
Syntax error at 'LexToken(;,';',1,477)'
[INFO] Performing clean build
...
[DEBUG] Xcode 4.0.2
[DEBUG] Build version 4A2002a
[INFO] Found 4.3.2 patch installed
[INFO] Application started
...

[INFO] starting couchdb (my own logging output)

[DEBUG] loading: /Users/Matthew/Titanium/XXX/Resources/com.obscure.couchbase_ti.js, resource: Users/Matthew/Titanium/XXX/Resources/com_obscure_couchbase_ti_js

[ERROR] Script Error = Couldn't find module: com.obscure.couchbase_ti.

[DEBUG] application booted in 37.642002 ms

What is this "Resources/com.obscure.couchbase_ti.js" that it mentions here?

Is there anything I am obviously doing wrong?

FYI - I also unzipped the ZIP file and can see the folders as expected. I also performed clean builds.

Thanks for your help.

Matthew

error while building

I've downloaded 1.0.3 but when I attempt to build i a test app I get the following error:

[ERROR] Error: Traceback (most recent call last):
File "/Users/jmorton/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1274, in main
execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s %s" % (log_id,sdk_version,debugstr,kroll_coverage)],False)
File "/Users/jmorton/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1180, in execute_xcode
output = run.run(args,False,False,o)
File "/Users/jmorton/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/run.py", line 39, in run
sys.exit(rc)
SystemExit: 65

automatically build ios-openssl submodule

Currently, the ios-openssl submodule needs to be built manually. Modify the project dependencies so it gets automatically built when xcodebuild is run on the top-level project.

[ERROR] Script Error = Couldn't find module: com.obscure.couchbase_ti.

Hi pegli,
first i wanna thank you for your great job and hard work. I'm trying to get the module started for some days now but it just don't work. Today i tested the version 1.0.1 and used the new instructions on the wiki page. That fixed an error which i had the last days, but now Titanium says it can't find the module. In the tiapp.xml i just replaced with com.obscure.couchbase_ti. The rest i left as it was. I also created a new mobile project for testing.

Here is my console output when i start the app:

[INFO] One moment, building ...
[DEBUG] Detecting modules in /Users/schultze/Documents/Titanium Studio Workspace/test1/modules
[DEBUG] Detecting modules in /Users/schultze/Library/Application Support/Titanium/modules
[DEBUG] Detected module for iphone: com.obscure.couchbase_ti 1.0.1 @ /Users/schultze/Library/Application Support/Titanium/modules/iphone/com.obscure.couchbase_ti/1.0.1
[INFO] Titanium SDK version: 1.7.3
[INFO] iPhone Device family: universal
[INFO] iPhone SDK version: 4.3
[INFO] iPhone simulated device: iphone
[DEBUG] executing command: /usr/bin/killall iPhone Simulator
[DEBUG] No matching processes belonging to you were found
[DEBUG] finding old log files
[DEBUG] executing command: mdfind -onlyin /Users/schultze/Library/Application Support/iPhone Simulator/4.3 -name 9fe6cb6b-e2dc-4e4b-90de-b3f0394090cb.log
[INFO] Launching application in Simulator
[INFO] Launched application in Simulator (1.31 seconds)
[DEBUG] executing command: xcodebuild -version
[DEBUG] Xcode 4.0.2
[DEBUG] Build version 4A2002a
[INFO] Found 4.3.2 patch installed
[INFO] Application started

[DEBUG] reading stylesheet from: /Users/schultze/Library/Application Support/iPhone Simulator/4.3.2/Applications/07ED2FC3-6CA4-4BC8-BC11-D56756265791/test.app/stylesheet.plist

[INFO] test1/1.0 (1.7.3.dcf4257)

[DEBUG] Analytics is enabled = YES

[DEBUG] loading: /Users/schultze/Documents/Titanium Studio Workspace/test1/Resources/app.js, resource: Users/schultze/Documents/Titanium Studio Workspace/test1/Resources/app_js

[DEBUG] loading: /Users/schultze/Documents/Titanium Studio Workspace/test1/Resources/com.obscure.couchbase_ti.js, resource: Users/schultze/Documents/Titanium Studio Workspace/test1/Resources/com_obscure_couchbase_ti_js

[ERROR] Script Error = Couldn't find module: com.obscure.couchbase_ti.

[DEBUG] application booted in 29.577971 ms

I'm a bit confused because Titanium detects the module but later it can't find it.

Thanks in advance.

Andy

Edit: I also tried unpacking the zip as instructed in the wiki, but it makes no difference. Titanium also unpacks the zip automatically if i just put the zip into the root folder.

Couldn't find module: com.obscure.couchbase_ti

I've been searching around for a few days now, and have tried many suggestions on fixing the below error:

Couldn't find module: com.obscure.couchbase_ti

I'm running the latest version of appcelerator (1.7.5), OS X Lion and have placed the module folder in the correct location (both in the root application support folder, and the users)

I am able to get the admob module loading and working perfectly fine, yet your module continues to break. Is this a known problem?

On Resume from Pause the local server appears to have stopped working.

CouchBooks is running on a iPhone 4, iOS 5. I haven't been able to replicate this on the simulator because of how the process is handled. The module was downloaded from Appcelerator Marketplace.

Summary: When CouchBooks is put in to the background (paused) and the device is turned off. The local server is shutdown by the iOS. On Resume I have not been able to restart the server.

Titanium.App.addEventListener('resume', function(e) {
Ti.API.info('back from pause');
  db.info(function(resp, status) {
    if(status === 200) {
        //the local couch server is still running
        //do something like _replicate
    } else {
        //the local couch server is not running, do a restart
        var couchbase_ti = require('com.obscure.couchbase_ti');
        couchbase_ti.addEventListener("com.obscure.couchbase_ti.server_started", function(e) {
            localServer = e.serverUrl;
            controller.open(books.createRootWindow(controller, db));
        });
        couchbase_ti.startCouchbase();
    }
  });
});

How do I restart the server on Resume?

Other than not being able to restart the server after Power Off/ Resume, CouchBooks has been working great. I even have _replicate running with a remote CouchDB instance running on an Amazon EC2 server. The speed is impressive.

Update: This thread refers to the resume from background problem and resolution in Couchbase Mobile back in August. https://groups.google.com/group/mobile-couchbase/browse_thread/thread/ed4f90d98e0fd343/aab8d05b4187fa95?lnk=gst&q=background#aab8d05b4187fa95

Terminating in do_boot

[INFO] My App/1.0 (1.8.0.1.fbdc96f)
{"init terminating in do_boot",{'cannot get bootfile','/Users/dev/Library/Application Support/iPhone Simulator/5.0/Applications/AAE9A47A-CE6F-485D-9BAE-597A4DF16DB6/My App.app/modules/com.obscure.couchbase_ti/CouchbaseResources/erlang/bin/start.boot'}}
[INFO] Application has exited from Simulator

clang error - Possible path problem?

Okay so I have not been able to get this module to work so far. I think it has something to do with file paths. My titanium directory is installed in my Macintosh HD folder the very root of my mac, not in the user. I have the Couchbase frameworks placed in both the mac root frameworks folder as well as my user frameworks folder. I have placed the actual module in the root of my project folder as well as the root of my mac titanium modules folder. So far i have not been able to get the app to run when i have paced the module in my tiapp.xml. The current error I get is:

[ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR]
[ERROR] Error: Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1274, in main
execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=LOG__ID=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s %s" % (log_id,sdk_version,debugstr,kroll_coverage)],False)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1180, in execute_xcode
output = run.run(args,False,False,o)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/run.py", line 39, in run
sys.exit(rc)
SystemExit: 65

This is all done on a clean build. Does anyone have any ideas?

CouchbaseResources path

I'm using XCode 3.2.6, so I'm not sure if this is an issue or not.

I had an error when trying to load the default_ios.ini from CouchbaseResources directory.
So I noticed that the "[[NSBundle mainBundle] bundlePath]" returned the application root directory, and not the "modules" one.
In order to fix it, I changed the following line into ComObscureCouchbase_tiModule.m from:

NSString * resourcesPath = [[NSBundle mainBundle] pathForResource:@"CouchbaseResources" ofType:nil inDirectory:@"com.obscure.couchbase_ti/1.0/assets"];

to:

NSString * resourcesPath = [[NSBundle mainBundle] pathForResource:@"CouchbaseResources" ofType:nil inDirectory:@"modules/com.obscure.couchbase_ti/1.0/assets"];

Thanks

i am unable to build the project

when i run the project with coubaseTi 1.0.3 and the newest build i get this error.
Couldn't register com.obscure.example.CouchBooks with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.sharedlibrary apply-load-rules all
Current language: auto; currently objective-c
(gdb)
am i forgetting something? or what am i doing wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.